- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 12:22 AM
We have three variables in a catalog referring to three different tables, for example
1st variable- should populate list from pillar table
2nd variable- should populate list from roles table
3rd variable- should auto-populate list from responsibilities tables
A new "Access Relationship" table has been configured to define a relationship between above three tables(Pillar, Role and Responsibilities".
so in catalog variables we need to populate the records in such a way that, if-
1sr Part- Pillar is selected as 'General Business', then only these three roles(attached screenshot) should be available to select in drop-down of variable role. if another pillar is selected then depending on that, values should change in Role variable.
2nd Part- And based on the role selected responsibilities mapped in new table should auto-populate. The variable is a list-collector and is read only.
We have wrote one script include(Attached screenshot) to populate Roles based on the Pillar selected and added that script include as a reference qualifier in Role variable- Till Now everything is working correctly.
then we wrote another script include and calling it from catalog client script to auto-populate responsibilities.
These two scripts are also working fine and auto-populating the responsibilities based on role selected, but when we wrote these two scripts and first script include and reference qualifier stopped working.
And now if first script is working then second script include is not and if second script include is working first one is not working.
Any help on this how we can make this work and variables will populate the list from relationship mapping table or any other workaround.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 07:52 AM - edited ‎09-13-2023 07:59 AM
Hi @neha_rathore ,
For the Role variable, instead of going for a script include, add the below line in advanced reference qualifier :
javascript:'pillar='+ current.variables.pillar;
put a semicolon after the javascript keyword, ignore the auto correction of code &colon
Note : Also add the attribute suggested by @Brad Bowman as ref_qual_elements=pillar
Now you end up having one script include to populate Responsibilities. Hope it will work now.
I hope this helps. Mark my answer correct & Like Helpful, if Applicable.
Thanks!
Venkatesh Nekkanti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 06:09 AM
I'm not really following when something is working or not, and this is tough to troubleshoot without the full scripts and variable definitions. It looks like you have three separate variables determining the values for three more separate variables, so they shouldn't affect one another. Ensure you don't have any other UI Policies or Client scripts affecting the three variables you are trying to set the list for. Responsibilities in the Access Details section looks like a list field, so you just need to call the script include from your reference qualifier. On this variable, be sure to add a variable attribute like:
ref_qual_elements=var_name
where var_name is the name of the first Responsibilities variable. If you have any existing attributes, comma separate them. This will ensure that the list filter is refreshed when the first Responsibilities variable changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 07:52 AM - edited ‎09-13-2023 07:59 AM
Hi @neha_rathore ,
For the Role variable, instead of going for a script include, add the below line in advanced reference qualifier :
javascript:'pillar='+ current.variables.pillar;
put a semicolon after the javascript keyword, ignore the auto correction of code &colon
Note : Also add the attribute suggested by @Brad Bowman as ref_qual_elements=pillar
Now you end up having one script include to populate Responsibilities. Hope it will work now.
I hope this helps. Mark my answer correct & Like Helpful, if Applicable.
Thanks!
Venkatesh Nekkanti