Checking if a Date/Time field is empty in a client script

bvq1
Giga Contributor

Hi All, 

I have created a new field on the task_sla table called "Actual Breach Time". I am trying to create a client script that sets the actual breached time field when the stage field changes to breached. This is what I have so far: 

find_real_file.pngIt works when I remove " && g_form.getValue('u_actual_breach_time') == null". But I need to ensure that the Actual Breach Time (Date/Time) field is empty as well. 

Please advise. 

Best regards, 

BVQ

5 REPLIES 5

Shashikant Yada
Tera Guru

Try with && g_form.getValue('u_actual_breach_time') == ''

Or you can try with && g_form.getValue('u_actual_breach_time') == NULL

But client script will work once you open the form and change the value.

Thanks
Shashikant

Hit Helpful or Correct on the impact of response.

Gopinath Krish1
Tera Contributor

Hi,

Instead of null you just try with single codes like g_form.getValue('u_actual_breach_time') == ''

Thanks

Gopi

bvq1
Giga Contributor

Hi Shashikant,

Thank you for the rapid response. That is a good point! haha. My goal is still to set the actual breached time field when the stage field changes to breached. What would be the best way to go about this?

Best regards,

BVQ

 

You can write OnAfter BR and add the condition as given below

find_real_file.png