List Collector passed values

dev_K
Tera Contributor

Hi,

 

 

I would like to see in what format, after the request submission the values of a list collector are passed.

 

Let's say here:

dev_K_0-1717675810708.png

 

 

How can I retrieve the values selected by user when using  grReqItem?

 

var userConsumers = grReqItem.variables.consumer;
Will consumers will be an array, a string with coma seperated values?
 
 
I use it in the catalog task configuration.
 
 
Thanks!
1 ACCEPTED SOLUTION

dhanrajb
Tera Guru

Hi ,

 

I think, you will get the (string) comma seperated sys_id(s).

 

Regards,

Dhanraj.

View solution in original post

9 REPLIES 9

dhanrajb
Tera Guru

Hi ,

 

I think, you will get the (string) comma seperated sys_id(s).

 

Regards,

Dhanraj.

dev_K
Tera Contributor

how can I check this?

Mark Manders
Mega Patron

You will get a comma separated string of sysid's.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

so basically I wont be able to do the following:

 

consumers = ['example1', 'example2', 'example3'];
var userConsumers = grReqItem.variables.consumer;

//Check if min 1 element in userConsumers is in consumers list
var returnValue = userConsumers.some(function(consumer) {
    return consumers.includes(consumer.trim());
}) ? 'true' : 'false';
 
 
 
Basically I want to see if the options selected by user are same as the ones from 'consumers' list
 
 
Thanks!