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.

Is it possible to get the sysids of the values in a list collector in flow designer?

donnadavis
Tera Expert

I have values in a list collector and some of the values contain commas.  For example, Bugs Bunny, MD or Looney Tunes Practice, PLLC.

I have been able to get a script working that uses the DIsplay Value from the list collector.  I use the names to call a custom table to get more information for the catalog task.  Splitting the values is a problem for those that have commas as part of their name.

I have tried to get the sysids instead and have had no luck.  I used the following

var cdonna = fd_data.trigger.request_item.variables.ci_practices;

and it returns

cdonna = com.glide.vars2.Variable@d2697e

Ankur Bawiskar helped me tremendously in identifying what I needed to access the variables.  I am hoping that there is something special that is needed in FLow Designer to access the sysids.

Thanks for any information you can provide.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Donnadavis,

I am assuming you are trying to get sysId value after the step Get Catalog variable action. If yes then replace fd_data.trigger.request_item.variables.ci_practices; with

type fd_data. in the script editor and you will get option to select get catalog variable set ->Select that->After that type (dot i.e .) and you will see the variable and select that

Reference ; 

fd_data._1__get_catalog_variables.lc //_1__get_catalog_variables is my first step get catalog variables.

View solution in original post

8 REPLIES 8

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Donnadavis,

I am assuming you are trying to get sysId value after the step Get Catalog variable action. If yes then replace fd_data.trigger.request_item.variables.ci_practices; with

type fd_data. in the script editor and you will get option to select get catalog variable set ->Select that->After that type (dot i.e .) and you will see the variable and select that

Reference ; 

fd_data._1__get_catalog_variables.lc //_1__get_catalog_variables is my first step get catalog variables.

donnadavis
Tera Expert

Thank you very much

You are very welcome.

Edxavier Robert
Mega Sage

@Pradeep Sharma  & @donnadavis  @Ankur Bawiskar 

I am currently facing the same situation, I am working in a flow designer were I have a variable that is from a list collector. I am trying to get the list of users into the description on the sc_task that I am creating. I tried to use this: 

var memberTeams = fd_data._1__get_catalog_variables.teams_members.getDisplayValue();
return memberTeams;

and this other

var memberTeams = fd_data._1__get_catalog_variables.teams_members.toString();
return memberTeams;

But is returning the sys_id of the user 

find_real_file.png

Any idea? I will keep searching, but just in case I posted here.