- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 11:38 AM - edited 10-10-2023 11:16 AM
Trying to figure out how to show the variables within a variable set under the auto-populate tab for a catalog item variable.
I checked the definitions on the dictionary entry for the dependent question field, which led me to the SNCCatalogUtil script include.
It makes sense why I can't see any of the variable set reference fields because a variable can only belong to either a catalog item or a variable set, but not both. The script include checks whether the variable record is on a catalog item or not (i.e., on a variable set) and then filters the variable list down.
Ideally, at least from my perspective, that dynamic reference qualifier would look at the variables specific to the catalog item—as well as include variables on any variable sets on the catalog item as options for the dependent question. Though the latter doesn't seem to be the case on our instance. We're currently on Utah patch 4 hotfix 2b.
I cannot think of a way to readily implement that as of right now, nor do I know if the auto-populate functionality would actually work if I could get that dependent question to show the variable set variables there.
Does anyone have any insight here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 11:49 AM - edited 10-11-2023 06:39 AM
Looking at your SI function more closely, and the updated one. I can see they fully intended for this to work, but a simple logic error is preventing it. You should be able to fix this (until you can upgrade) by copying the SI and updating the function (then calling your new SI from the reference qualifier). My reference qualifier is exactly the same as yours.
getDynamicValueFieldRefQual: function(catItemId, variableSetId, variableId) {
if (catItemId) {
var srvsIdList = this._getSingleRowVariableSetIdList(catItemId);
if (srvsIdList.length != 0)
return 'cat_item='+catItemId+'^ORvariable_setIN'+(srvsIdList)+'^sys_id!='+variableId+'^typeIN8,31';
else
return 'cat_item='+catItemId+'^sys_id!='+variableId+'^typeIN8,31';
}
else if (variableSetId)
return 'typeIN8,31^variable_set='+variableSetId+'^sys_id!='+variableId;
return 'cat_item=-1';
},
I can also confirm that this is not fixed as of Utah patch 7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 09:01 AM
After digging into this further, I've realized there are a couple of scenarios that are not covered in Vancouver or this enhancement, and have posted a more encompassing solution in this article: