populate date field based on another field value change

siva58
Tera Contributor

i have teo fields in the request form. 1. Approval

siva58_0-1666091185836.png

2. Approval date

siva58_1-1666091306615.png

if we change the Approval field value as Approved, Approval date field need to display the date. 

ex: if we change approval field value as approval today, approval date field need to display today date.

similar to we we change the approval field value  to approval  after 2 days,  approval date field need to display on that date.

1 ACCEPTED SOLUTION

Hey Siva,

 

The business rule solution is the quickest possible way to achieve the requirement.

In case you need it via client script, you can try using  the solution provided by SnowLearns below.

 

please mark my solution as helpful if it somehow helped you reach your solution or to enhance your understanding.

 

Thanks,

Shreya

View solution in original post

12 REPLIES 12

Hey,

 

It can be directly typed in the field that comes up on selecting Approval Date >> To >

javascript;gs.now();

it should serve your purpose.

 

Please mark it helpful if it works for you.

 

Thanks,

Shreya

Hey Siva,

 

Please let me know if my solution worked for you. If so, please mark the below reply as helpful.

 

Have a good day!

 

Thanks,

Shreya

@Shreya Kaushik1 

is their any methos to solve this through Client script

Hey Siva,

 

GlideDate, GlideDateTime or gs.now (); all these are server-side functions and can't be accessed via client script.

 

Thanks,

Shreya

Hey Siva,

 

The business rule solution is the quickest possible way to achieve the requirement.

In case you need it via client script, you can try using  the solution provided by SnowLearns below.

 

please mark my solution as helpful if it somehow helped you reach your solution or to enhance your understanding.

 

Thanks,

Shreya