I want to restrict the time worked field on the same form

mania
Tera Contributor

Hi,

 

Step 1 : I have a field called Time worked. Initially when I open form it should showing 00:00:00. so here when I before save or update the form It should show error message like 'Please fill the time worked before updating the ticket.' - This is working as mentioned below Screen sorts.

mania_1-1707732305347.png

mania_3-1707732365429.png

mania_4-1707732421879.png

mania_6-1707732457098.png

Step 2: Once I started the timer or manually updating the time and save the form the Time worked field is showing 00:00:04 and that time is added to Time worked related list as per OOB code - This is working as mentioned below Screen sorts.

mania_7-1707732570642.png

mania_9-1707732600698.png

Step 3 : Here I already updated the time on that time worked field and saved that form it showing 00:00:04 along with 00:00:00 but here I want to refresh time worked field value like 00:00:00 along with 00:00:00 and again when I before save or update the form It should show error message like 'Please fill the time worked before updating the ticket.' on the same form (Like for second time updating the time worked field).

Can you please help on this. It will be helpful.

 

Thanks in Advance!

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, a few possible solutions.

An onload() client script to reset the field back to default in the form (this should occur after your update is saved).
An update to the BR that creates the task_time_worked record, to reset the field to default value, but this will result in a second update to the task record if the task_time_worked update is an after BR.