Jump to content

Show a link when 30 days has passed


Recommended Posts

I need a solution to show a link once 30 days has passed since the last record update.

 

First, I am using a calculated field to calculate the number of days that has passed since the date of Last Updated. Then, I have a condition that if the days passed are less than 30 days, show nothing. If the days passed are greater than 30 days, show a link (it's a link to edit the record).

 

<script>
if ([@calcfield:1#] < 30) {
document.write(blank);
}
else{
document.write('<a href='https://c4ect907.caspio.com/dp.asp?AppKey=e5295000169646ebdc934a6e96d4?Keyword_ID=[@field:Keyword_ID]'>edit</a>');
}
</script>

 

Link to comment
Share on other sites

1 hour ago, DaeBo said:

I need a solution to show a link once 30 days has passed since the last record update.

 

First, I am using a calculated field to calculate the number of days that has passed since the date of Last Updated. Then, I have a condition that if the days passed are less than 30 days, show nothing. If the days passed are greater than 30 days, show a link (it's a link to edit the record).

 


<script>
if ([@calcfield:1#] < 30) {
document.write(blank);
}
else{
document.write('<a href='https://c4ect907.caspio.com/dp.asp?AppKey=e5295000169646ebdc934a6e96d4?Keyword_ID=[@field:Keyword_ID]'>edit</a>');
}
</script>

 

Try using double quotes for the URL of the datapage:

"https://c4ect907.caspio.com/dp.asp?AppKey=e5295000169646ebdc934a6e96d4?Keyword_ID=[@field:Keyword_ID]"
 

Link to comment
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...