- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 02:44 AM
Hello,
I have an order guide setup for new hires. Within this guide, the manager must first select the brand the new hire will work for from a reference variable to the company table. I then have a list collector variable with a question_choice reference for hardware the new hires can order (originally variable was a multiple choice that has been turned into a list collector).
I want to hide certain choices depending on the brand they select. For example CompanyA should be able to see everything on the list but CompanyB shouldn't be able to see Macbook and CompanyC shouldn't be able to see Macbook or iPhone.
I have read previous articles of adding it to the reference qualifier but 1) I'm not very good with scripting and 2) I don't know how to add anything in there whilst also incorporating the question=sysID which is already in there.
Please help.
Thanks
Abbie
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 06:25 AM
Yeah, sure, sorry I misunderstood. In this format you'll want to keep the logic as simple as possible, so to only show 'password' when 'Acer' is selected would look more like this:
var ret = 'question=8aeaab25c0a8001500044f3982c9ecb5'; if(current.variables.v_company.name!="Acer"){ret = ret + '^value!=password';}ret
then you would have to add an if block for every criteria. If it gets too complicated we should try the Script Include approach where you can lay out all of the logic and have it return only the correct values within a full script instead of trying to string it all together like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 06:36 AM