Variables - Auto populate

Vengeful
Mega Sage

Hello,

 

I have 2 variables for a specific request item that should be auto populate.

Valid from should be auto populate on the date of creation/submission.

Valid to is dependent to Validity.

If I select 1 week, the Valid to date should automatically populated based on the user’s selection.

Merza_0-1692670351884.png

Merza_1-1692670455698.png

 

How can I configure that kind of setup?

 

1 ACCEPTED SOLUTION

@Ankur Bawiskar 

I tried to add this on default value javascript:gs.nowDateTime() and it worked.

Merza_0-1692682585082.png

My problem now is the Valid to.

View solution in original post

15 REPLIES 15

@Ankur Bawiskar 

The date today just like the Valid from.

Hi @Ankur Bawiskar @Jim Coyne 

I am thinking for BR, but I am not sure with the script.

@Vengeful 

did you try changing the ;

while we post in response it is getting converted to :

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Apologies, I marked a solution for Valid from and will post another for Valid To.

Change ":" to an actual ":"