Flow Designer - Populate "Fields" input using script

Jacob26
Tera Guru

Greetings developer community,

 

I am working on a flow in Flow Designer, and I have a need to populate a "Fields" type action input using a script. Does anyone know how the return value should be formatted for an input of this type? I am unable to find anything on this in the ServiceNow documentation or community.

 

I've tried a JSON containing key/value pairs, but this doesn't appear to be working. I appreciate any assistance on this.

 

Jacob26_1-1688565603269.png

 

 

1 ACCEPTED SOLUTION

Jacob26
Tera Guru

So I was able to solve this. By looking at the action script, at least in my case it looks like this type of input is formatted like an encoded query string, like this:

Name=SomeName^Type=SomeType^Value=SomeValue

 

So in my scripted input, I formatted the return value in this way and it began working as expected. Hope this helps someone in the future!

View solution in original post

1 REPLY 1

Jacob26
Tera Guru

So I was able to solve this. By looking at the action script, at least in my case it looks like this type of input is formatted like an encoded query string, like this:

Name=SomeName^Type=SomeType^Value=SomeValue

 

So in my scripted input, I formatted the return value in this way and it began working as expected. Hope this helps someone in the future!