Reference a choice on a string table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 02:35 PM
Hi all,
On my incident table we have fields to sort by Business Service, then by category, and finally by Item. (Pic 1).
Item is a Dictionary Entry string with a list of multiple choices attached to it (Pic 3 & 4).
I want to set two fields on my incident table (Pic 2) to be equal to a field on the choice that is selected (Pic5).
Basically if an item is selected, it should auto add the escalation field from the selected choice to the corresponding field on the incident.
I created a business rule for this but it just leaves it blank and I was curious if anyone has ever had to do this one?
(function executeRule(current, previous /*null when async*/) {
var lvl0 = current.u_item.u_level_0_escalation;
var lvl2 = current.u_item.u_level_2_escalation;
current.u_level_0_escalation = lvl0;
current.u_level_2_escalation = lvl2;
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 04:03 PM
u_item is a string. It wont have a reference so it would be empty.
What type of fields are u_level_0_escalation and u_level_2_escalation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 04:07 PM
Hi!
0 is a string and 2 is a group. Both could be strings if needed though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 04:22 PM - edited ‎02-22-2023 04:23 PM
Give an example of what lvl0 should represent as a string like "Abstract"
then explain where you would get those "Abstract"
If you want u_item to populate the "Abstract"
current.u_level_0_escallation = current.u_item.toString(); or current.getValue('u_item');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 05:13 PM
So level 0 will be text or a link. In a lot of cases it will be a link to self help or to a saas status page.
In my testing I could get item the way you mentioned, was hoping there was a way to get the others but not sure how since it’s a choice within the dictionary entry.