Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow how fetch the value from lookup record and update another record field

Arun_Manoj
Mega Sage

Hi,

 

I facing an issue in flow , there is a loop up record action to fetch the value of field, .

some other condition new record will be create. In that one field needs to update by the above mentioned field.

 

 

 

@Ankur Bawiskar  

 

eg:

 first record have Date occur .

 

when second record get created the Date occurred will be 30 days more than the first record occur date,

1 ACCEPTED SOLUTION

Mohammed8
Mega Sage

Hi @Arun_Manoj 

I'm assuming Date occur is Date/time field and has backend name as date_occur

 

When your action creates a second record, in field select the field Date occur. For this field toggle the scripting on and you can follow similar script and tweak as per your use case. it would be great if you shared more details/screenshot.

var date1 = fd_data._1__look_up_record.record.date_occur;

var gd = new GlideDateTime(date1);

gd.addDays(30);

date_occur=gd;

return date_occur;

 

Thanks and Regards,

Mohammed Zakir

View solution in original post

2 REPLIES 2

Mohammed8
Mega Sage

Hi @Arun_Manoj 

I'm assuming Date occur is Date/time field and has backend name as date_occur

 

When your action creates a second record, in field select the field Date occur. For this field toggle the scripting on and you can follow similar script and tweak as per your use case. it would be great if you shared more details/screenshot.

var date1 = fd_data._1__look_up_record.record.date_occur;

var gd = new GlideDateTime(date1);

gd.addDays(30);

date_occur=gd;

return date_occur;

 

Thanks and Regards,

Mohammed Zakir

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

share some screenshots so that we can help better

 

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