Is it possible to access reference fields in a list collector via script in the workflow?

Nick18
Tera Contributor

Hello,

 

I'm currently on a project where an automated interface is triggered with an order from the servicecatalog.

Depending on what the user chooses in the request, a different value needs to be send through that interface.

In my case it's about AAD groups.

We don't want to show the technical group Name to the enduser and instead use a table for matching with a "userfriendly" Groupname (there is additional information in the table as well).

When I use a reference Field to show the user one value and use dotwalking in the workflow to access the technical field in the table, it already works.

The issue is, that we want to allow the user to choose multible AAD groups in one Request and for that I use a List collector field with a reference on the same table.

Is it possible to access the related value in the table via a list collector, or do I have to use an additional lookup using the sysid that is in the list collector?

Or is there a completely different solution for this?

 

Thanks in advance

 

Regards Nick

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

A List Collector variable is going to store a comma-separated list of sys_ids, so you would need to use this in a workflow script in a GlideRecord with a line like

...addQuery('sys_id', 'IN', current.variables.var_name);

Then for each record returned, grab the field that you want into an array or whatever.

 

View solution in original post

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

A List Collector variable is going to store a comma-separated list of sys_ids, so you would need to use this in a workflow script in a GlideRecord with a line like

...addQuery('sys_id', 'IN', current.variables.var_name);

Then for each record returned, grab the field that you want into an array or whatever.

 

Nick18
Tera Contributor

Thanks for the quick Answer, so there is no dotwalking way and I have to use a query.