Jump to content

Recommended Posts

You need to add a FORMULA field to your table to calculate 5 days before appointment :

Dateadd(day, -5, [@field:AppointmentDate])

Select [@field:AppointmentDate]  from picker.

Then in your report you need to have the following code in HTML Block

<div id="record[@field:ID]"></div>
<script>
if (  '[@cbTimestamp*]' > '[@field:FivedaysToDate*]') {
document.getElementById("record[@field:ID]").innerHTML = "<a href='http://caspio.com'>Click here to open Caspio</a>";
} 
</script>

[@field:ID] should be replaced with field which is keeping the unique ID and also href value with the link you want to open. [@field:FivedaysToDate] is the formula field in the table. Attached is the sample page you can import to your account

CaspioData_2017-Sep-20_1404.zip

Link to post
Share on other sites

First of all, thank you so much for addressing this topic!

 

Second, I've entered this into my html block like so:

<div id="record[@field:tbl_schedule_appointment_Appointment_ID]"></div>
<script>
if (  '[@cbTimestamp*]' > '[@field:tbl_schedule_appointment_Appointment_RescheduleLimit*]') {
document.getElementById("record[@field:tbl_schedule_appointment_Appointment_ID]").innerHTML = "<a href="#" onclick="window.open(&quot;https://c0abz413.caspio.com/dp.asp?AppKey=b59950002482bd3538ce4196929d&amp;Appointment_ID=[@field:tbl_schedule_appointment_Appointment_ID]&quot;,&quot;mywindow&quot;, &quot;menubar=1,resizable=1,scrollbars=yes,width=630,height=610&quot;)"><img alt="" src="https://antidotecrs.com/wp-content/uploads/2017/09/rescheduleicon.jpg" style="width: 20px; height: 20px;" /></a>";
}
</script>

Now I'm not showing any icon when I preview the page.

I have checked the formula field; it is working. Could this be because I am using an image on my calendar as the reschedule link?

 

Thanks in advance!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...