Flow Designer script

ServiceNow10sun
Giga Guru

Hi All , 

 

i need openedBy field should be mapped to who ever instiaties the flow . 

Example this flow gets triggered when ever the state moved from new to review . 

So i need Openedby field should be mapped to who ever initiated the flow . 

Pls suggest how to achieve this and how . 

1 REPLY 1

Rajesh Chopade1
Mega Sage

Hi @ServiceNow10sun 

To achieve your requirement follow below steps:

- Create a new flow and set the trigger to "When a record is updated" on the respective table (for example, task or any custom table).

- Set the condition to trigger only when the state changes from "New" to "Review" (e.g., state changes from New to Review).

- Add an action after the trigger to update the record.

- In the action, choose the table where you want to set the OpenedBy field (the same table where the state is updated).

- Set the value of the OpenedBy field to current.runAs.user_id. This field refers to the user who triggered the flow.

- Once configured, activate the flow.

Now, every time the state changes from "New" to "Review," the OpenedBy field will be set to the user who initiated the flow.

 

I hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.

thank you

rajesh.