Business Rule can't access a proper translation of select box choices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 07:10 AM
I created a record producer (produces an incident). It has a variable set "More people interested", and inside it there is just one variable - question "More people interested?" of type select_box, that has three choices - "Yes", "No", "I don't know". I entered translations of these choices through Record Producer option "Edit Translations", and they're working fine when I go to that record producer on Employee Center.
But I also have a Business Rule that is suppose to take all variables form a newly created incident and put it into an incident description like that:
(function executeRule(current, previous /*null when async*/ ) {
gr_question_answer.addEncodedQuery('table_sys_id=' + current.getUniqueValue());
gr_question_answer.query();
var description = '';
while (gr_question_answer.next()) {
if (gr_question_answer.getDisplayValue('value') + '') {
var question = gr_question_answer.getDisplayValue('question');
var value = gr_question_answer.getDisplayValue('value')
description = description + question + ': ' + value + '\n';
}
}
current.description = description;
current.update();
})(current, previous);
But when somebody on Employee Center chooses a different language (let's say french) that has a proper translations as mentioned above, incident description looks like that:
Plus de personnes intéressées: Yes
instead of:
Plus de personnes intéressées: Oui
What can I do to make that Business Rule access the right translations of these choices?