how to auto-populate from date and to date (15 days from from date) in record producer using catalog client script.

Shanawaz SK
Tera Contributor

I want to auto-populate a field using catalog client script.

1 ACCEPTED SOLUTION

Afrith Shariff
Tera Guru

From what I have understood from your question, you want to auto-populate a field date with a date that is 15 days prior to the date selected.

 

you can use GlideDateTime to perform date operations, 

firstly create a GlideDateTime object and store that to a variable (this will have the current date value).

now create another variable and use .addDayUTC(<no of days to be added>) (this will have the updated date value).

now set the second variable to the field in which you want to auto-populate the date.

 

thanks,

Afrith.

View solution in original post

2 REPLIES 2

Shakeel Shaik
Giga Sage
Giga Sage

Hi @Shanawaz SK 

 

 Please refer to the below link.

 

If my response is helpful, then Please mark it as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

Thanks,
Shakeel Shaik 🙂

Afrith Shariff
Tera Guru

From what I have understood from your question, you want to auto-populate a field date with a date that is 15 days prior to the date selected.

 

you can use GlideDateTime to perform date operations, 

firstly create a GlideDateTime object and store that to a variable (this will have the current date value).

now create another variable and use .addDayUTC(<no of days to be added>) (this will have the updated date value).

now set the second variable to the field in which you want to auto-populate the date.

 

thanks,

Afrith.