- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 04:54 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 09:12 AM
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();
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:39 AM
@Patrick Slatter Can you send screen shot of your list collector variable and
check question table display field also
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:43 AM - edited 02-10-2023 05:45 AM
Question_choice table
Question field
However checking display on that column breaks the record producer field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:50 AM
@Patrick Slatter Since you already did map to fields no need to right the script in producer remove that line and try.
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:54 AM
Same result
//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";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:59 AM
@Patrick Slatter If you select manually in list collector your are able to see values??
Bharath Chintala