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.

Set reference field value from flow designer action

Renu9
Tera Contributor

Hi All,

I am having a sample change requests field (list type) in table A. When the record on table A gets closed, I am triggering a change task to create. I need to populate change request (reference field) value with the values from the sample change requests in table A. As its  a list type, I need to display any one of the sample change request from the list.

Please find the screenshot below. I am getting the sys id of the change request but its not getting set to the change request field on change task. Kindly suggest any changes

find_real_file.png

16 REPLIES 16

Aman66
Tera Contributor

hi @Mohit Kaushik i have upload a screenshot above . basically i want to get the data(change request number ) from step6 and set it into step7 (field name is change request).

sir change request record generate successfully fine. and also change task is also created when i have apply only parent but when i apply both field change request and parent that time it is not created

Hi @Aman66,

As i said earlier, scripting is not required. You just have to set the value in change request field as you are setting in parent field. Instead of choosing Trigger-> Requested Item you have to choose value from step 6 -> change request record. 
Hope that should help you.

 

 

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

hi @Mohit Kaushik  i am choose like the way change request  ->   6 - change request ->number than the flow execution showing complete but did not create the change task

Hi @Aman66, can you please post the screenshot of your flow and if you see anything in the logs?

 

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

Yes, for the field the backend name is change_requests. 

Trigger record is whenever the record on table A gets closed, then change task gets created.

On the change task the change request backend name is change_request.

 

With the script , 

var chngreq=fd_data.trigger.current.change_requests.getDisplayValue();
return chngreq;
 
I am able to get the change request number(checked it  through logs), but it is not getting assigned to change_request reference field on change task.