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 Can you send screen shot of your list collector variable and

 

check question table display field also

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

PatrickSlatter_0-1676036535009.png

Question_choice table 

Question field 

PatrickSlatter_1-1676036633385.png

However checking display on that column breaks the record producer field 

PatrickSlatter_2-1676036746600.png

 

 

@Patrick Slatter  Since you already did map to fields no need to right the script in producer remove that line and try.

 

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

Same result 

PatrickSlatter_0-1676037237973.png

//passing value of custom fields to demand record
producer.u_period_start_date;
producer.u_project_request_type;
producer.u_project_category;
producer.u_function;
producer.u_subteam;
producer.u_impacted_other_cross_functional_teams;
producer.u_project_scope;
producer.u_project_owner;
producer.u_transformation_support_needed_alteryx_process_optimization_projects_only;
producer.u_metrics;
producer.u_estimated_hours_saved_annually_if_unknown_input_0;
producer.u_other_benefit_if_any_or_if_metrics_is_10above;
producer.u_cfo_org_okr;
producer.u_system_scope;
current.variable = producer.variable;
current.comments += comments;

 

 

gs.addInfoMessage(gs.getMessage('Demand {0} has been created.', ['<a href ="/dmn_demand.do?sys_id=' + current.sys_id + '&sysparm_view=ess&sysparm_view_forced=true">'+ current.number +'</a>']));
producer.redirect = "catalog_home.do?sysparm_view=catalog_default";

 

@Patrick Slatter  If you select manually in list collector your are able to see values??

 

 

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