The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to hide an UI Action once planned start date and time passed

Upender
Giga Expert

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

1 ACCEPTED SOLUTION

Upender
Giga Expert

To hide UI Action when planned start date and time passed.



current.start_date.getDisplayValue()>=gs.nowDateTime()


View solution in original post

8 REPLIES 8

Andrew Saxton -
Tera Expert

Try current.start_date >= gs.nowDateTime()


While the Start date is greater (or later than) or equal to today, show.



You could also do !(current.start_date <= gs.nowDateTime())


Hi Andrew,


Thanks for reply.



This condition


current.start_date <= gs.nowDateTime()


is not comparing start date and time with current date and time.



It is just checking with current date and time basing on the condition < or >   hiding/showing the button.




Regards,


Upender


I'm not sure if I understand.



You have a UI action you wish to hide when the current date has passed the Planned start date, correct?



What is the condition you currently have for the UI action?


Andrew,


Hide UI Action when the current date and time has passed the Planned Start date and time.



Here are other conditions


(current.state == -4 || current.state == -2) && (current.type == 'emergency' || current.type == 'normal' || current.type == 'standard')




Regards,


Upender