- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017 12:14 AM
Hi,
I would like add a button using UI action and it should be visible only when end date is Today+10 days.
í�n Detail:
When ever end date is great than 10 days by Today's date.i want to show button on form.
So for this i have written a condition in UI action as below
current.end_date==gs.now+10
Can anyone help me how to write this validation in UI action condition.
Thanks & Regards,
Ajitha I
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017 12:26 AM
Hi Ajitha
Try below code. I think this should work. Also, please confirm if the UI action is in global scope or any other scope.If global then below code should work fine. But I am not sure If the below code will work in scoped application. You can try.
current.end_date <= gs.daysAgo(10)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017 02:49 AM
Please mark the answer correct

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017 12:36 AM
You can write entire scripts within the condition field, provided the script is within the max character limit of the field.
var tenDay = new GlideDateTime(current.start_date.getDisplayValue()); tenDay.addDays(10); var today = new GlideDateTime(); (tenDay.getDisplayValue() < today.getDisplayValue());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2017 01:19 AM
Hey Ajitha,
Could you please try the below code in your condition area:
current.end_date == gs.daysAgo(-10);
Do check the time field
Please Hit ✅Correct, â�ï¸�Helpful, or â�£ï¸�Like depending on the impact of the response
Have a lovely day ahead
Regards,
Divya Mishra