- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 09:51 AM
I have requirements to use assignment rules with a catalog variable that is in a variable set.
I can make make the condition for the assignment rules work for the catalog variables, but when I attempt to use the variable set variables, it gets erased before save.
What am I doing this incorrectly?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 04:51 AM
Hi @_hris A ,
it is possible to add variable of catalog as well as Single row variable sets variables in the condition
it's not possible to add the MVRS variables in the condition builder
you can use script as for assignment
something like this
var variableValue = current.request_item.variables.yourVarialbename
gs.warn('catalog task variable assignment '+variableValue )
if(variableValue =='10'){
current.assignment_group = 'your assignment group sysid'
}
but again it's better set the assignment group in the flow or workflow whichever is used to create the task
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 05:03 AM
It got saved for me and didn't clear after saving.
I will suggest to use before insert business rule if your assignment rule is not allowing you to configure.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 05:25 AM
You're trying to use variables from a variable set in an Assignment Rule, but:
The condition editor recognizes the variable initially.
After saving, the condition referencing the variable gets erased.
This is due to how catalog variables (especially those in variable sets) are stored in the sc_item_option_mtom table, not directly on the sc_req_item (RITM) or catalog task (e.g., sc_task) record. Assignment rules operate directly on task tables and can't access catalog variables stored this way without custom logic.
Please use a below script condition in your assignment rule to pull catalog variable values via script rather than the UI condition builder.(function executeRule(current, gSNC) {
var variableValue = getVariable(current.request_item, 'your_variable_name');
return variableValue == 'desired_value';
function getVariable(item, variableName) {
var varGR = new GlideRecord('sc_item_option_mtom');
varGR.addQuery('request_item', item);
varGR.query();
while (varGR.next()) {
var itemOption = varGR.sc_item_option;
itemOption.refresh(); // load the related sc_item_option record
if (itemOption.getDisplayValue('item_option_new') == variableName) {
return itemOption.getDisplayValue('value');
}
}
return null;
}
})(current, gSNC);
Please Replace 'your_variable_name' with the name of the catalog variable.Please mark my answer as helpful/correct if it resolves your query.
Regards,
Nitish Kr. Saini