- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2018 12:45 PM
Hi,
A field Planned Start date which of datetime field type, Revert Change button are on the form. My requirement is to hide Revert Change button once Planned Start date and time is passed.
I tried this condition
current.start_date <= gs.nowDateTime()
but it is not working.
Any suggestions.
Thanks in advance,
Upender
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2018 09:03 AM
To hide UI Action when planned start date and time passed.
current.start_date.getDisplayValue()>=gs.nowDateTime()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2018 01:40 PM
Try this in the UI conditions:
(current.state == -4 || current.state == -2) && (current.type == 'emergency' || current.type == 'normal' || current.type == 'standard') && current.start_date >= gs.nowDateTime()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2018 01:59 PM
Andrew,
If you write this condition
current.start_date >= gs.nowDateTime()
1. Button will appear on the form after start date is past
2. Button is hidden from the form if the start date field is empty
current.start_date <= gs.nowDateTime()
1. Button will be hidden on the form even before start date and time is started. Because by the time you select date and time is selected and saved current date and time is passed (as we are using = sign)
2. Button is shown on the form if the start date field is empty
As per my understanding
system is not comparing start date and time and current date and time. It is only checking with current date and time.
My requirement is to hide UI action once start date and time is passed not current date and time passed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2018 09:03 AM
To hide UI Action when planned start date and time passed.
current.start_date.getDisplayValue()>=gs.nowDateTime()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2019 08:03 AM
Hi Upender
The following is my condition as you suggested in UI Action
(current.approval=='not requested' || current.approval=='rejected' && gs.hasRole("itil")) && current.start_date.getDisplayValue()>=gs.nowDateTime()
However this is not working. Please Suggest