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.

Opened by is empty on sctask using flow designer

Gemma Jacobs
Mega Guru

Hi everyone, 

I'm new to using flow and got everything in my flow working correctly but Opened by is coming up empty on the task form. Has anyone else experienced this before? Attached is an example of the flow.

thanks in advance for any feedback you can provide!

GemmaFlowExampleHelp.png

 

2 ACCEPTED SOLUTIONS

Benjamin A
Mega Sage

Hello @Gemma Jacobs

 

When a flow is run as System User, the Opened By field will not be populated as there is no user who actually opened it.

 

To check/configure how your flow is running, click the ellipses in the top right of the window, select properties, and look at the Run As field. If this is set to System User, the behavior you are seeing is expected. If you use the User who initiates the session I believe that the Opened By will be populated.

 

You could also populate the field yourself when creating the catalog task on step four by using a data pill from the request trigger.

View solution in original post

Gemma Jacobs
Mega Guru

@Benjamin A Thank you so much! I will test that out now. I thought we were supposed to set it up as system user and guess I was confused. Thanks 

View solution in original post

9 REPLIES 9

Gemma Jacobs
Mega Guru

Thanks so much @Benjamin A your feedback worked perfectly! Really appreciate the guidance. 

Gemma Jacobs
Mega Guru

Quick question, when I impersonate a user and even reset their password to log in as the actual user with all the exact permissions, none of the tasks are created? However, if I log in as myself all the tasks are created correctly. Any ideas? 

This is what both Suma and I were referring to as the risk of using Run As User who initiated the session. The user must have the necessary permissions (via ACLs) in order for each step to occur. This is why it is recommended to use Run As System User and then use a data pill to populate the Opened By field.

Vignesh8
Tera Contributor

Hi @Benjamin A , Hope you are doing good. Are you suggesting to update the OOTB Flow to set the opened-by Field into SCTask ?

Hi @Vignesh8,

 

It seems that Gemma was building a custom Flow for a specific catalog item rather than modifying an Out-of-the-Box (OOTB) Flow. I’d recommend avoiding modifications to OOTB Flows if possible, as it’s generally better to maintain baseline configurations. Instead, consider creating a secondary Flow or automation to make any required updates after the OOTB Flow runs. This approach not only future-proofs the process but also simplifies ongoing maintenance.

 

In this case, Gemma wanted the catalog task to show the “Opened By” user as the one who initiated the request. Since the Flow was executing as “System,” the “Opened By” field was defaulting to “System” on the catalog task. To address this, you could adjust the Flow’s “Run As” settings or use a data pill to populate the “Opened By” field on the Create Catalog Task step (Trigger > Requested Item > Opened By).

 

Does this answer your question?

 

Best,

Ben