SYS ID displaying in list collector from record producer

Patrick Slatter
Tera Guru

Monring!

I am experiancing an issue with a list collector displaying the SYS ID instead of the display value. 

I have a list collector in a record producer that is using local choices (question_choice). This needs to log teh value and then map it into a list collector on the demand record that the record producer creates.

When this happens, it is placing the SYS ID into this field, instead of the display value. 

 

Any assistance would be greatly appriciated.

 

Thanks!

1 ACCEPTED SOLUTION

BharathChintala
Mega Sage

@Patrick Slatter 

use below code in record producer script

var sys = producer.u_impacted_other_cross_functional_teams;
var list =[];
var gr = new GlideRecord('question_choice');
gr.addQuery('sys_id', 'IN', sys);
gr.query();
while(gr.next()){
list.push(gr.value.toString());
}
current.u_impacted_other_cross_functional_teams=list.toString();

 

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

View solution in original post

19 REPLIES 19

@Patrick Slatter  I said remove and add again as I am sending replies from mobiles quotes are in wrong format  so just remove add again I said and also uncheck map to field check box in variable

 

also in line 36 current spell is wrong

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

@BharathChintala Sorry for the confusion. Changes made and same result

 

Variable:

PatrickSlatter_0-1676040983818.png

 

Script

 PatrickSlatter_1-1676040990699.png

 

 

Result 

PatrickSlatter_2-1676041011063.png

 

@Patrick Slatter I have modified  one more line in last reply as line 36 has spell mistake for current

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

Removed the addition 'r' spelling error in line 36 

PatrickSlatter_0-1676042149780.png

 

 

Same result 

PatrickSlatter_1-1676042157842.png

 

BharathChintala
Mega Sage

@Patrick Slatter 

use below code in record producer script

var sys = producer.u_impacted_other_cross_functional_teams;
var list =[];
var gr = new GlideRecord('question_choice');
gr.addQuery('sys_id', 'IN', sys);
gr.query();
while(gr.next()){
list.push(gr.value.toString());
}
current.u_impacted_other_cross_functional_teams=list.toString();

 

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala