- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Have anyone fixed this problem? Do you have any suggestions?
- ✅Catalog item variable var1
- ✅MRVS (Multi Row Variable Set)
- inside it → reference variable
✅Goal:
Use var1 (outside MRVS) inside the reference qualifier of the MRVS reference field.
In docs I see:
- Variables that are not included in an MRVS cannot be used in dependent reference qualifiers for variables in the MRVS. Similarly, the variables included in the MRVS cannot be used in dependent reference qualifiers for variables that are not in the MRVS. For a reference qualifier, the current row is the one that is being edited.
Service catalog variable sets • Australia ServiceNow AI Platform Capabilities • Docs | ServiceNow
Maybe there is some workaround...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
One approach is detailed in this article (Scene 2)
Another approach could be to first create an onLoad Catalog Client Script that applies to the Catalog Item
function onLoad() {
if (this) {
this.cat_g_form = g_form;
}
}
Then create an onLoad Catalog Client Script that applies to the MRVS, leaving the reference qualifier on the variable itself empty:
function onLoad() {
if (this) {
var ciClass = this.cat_g_form.getValue('ci_class');
var filter = g_list.get('field');
filter.setQuery('active=true^name=' + ciClass + '^internal_type=string');
}
}
Where 'ci_class' is the name of the catalog item variable, and the setQuery value is whatever makes sense for your use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
One approach is detailed in this article (Scene 2)
Another approach could be to first create an onLoad Catalog Client Script that applies to the Catalog Item
function onLoad() {
if (this) {
this.cat_g_form = g_form;
}
}
Then create an onLoad Catalog Client Script that applies to the MRVS, leaving the reference qualifier on the variable itself empty:
function onLoad() {
if (this) {
var ciClass = this.cat_g_form.getValue('ci_class');
var filter = g_list.get('field');
filter.setQuery('active=true^name=' + ciClass + '^internal_type=string');
}
}
Where 'ci_class' is the name of the catalog item variable, and the setQuery value is whatever makes sense for your use case.