Auto-populate variables within variable set on catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 10:52 AM
I am working on auto-populating all catalog item variables based on the user..
All variables are within two variable sets per screenshots below...
I want to populate the "Device name" and "organization" variable based on what ever user is selected in the "on behalf of" variable.
As of now it is referencing the "Requested by" variable on screenshot 2 using simple basic conditions. I was thinking if I switched out the sysID for the "on behalf of" sysID but that did not work...
Device name is referencing a computer table
1. Catalog item view from Service Portal
2. Variable set -> "Device Name" variable -> Type Specification Tab
3. Variable set "Peo Requestor information" -> "On behlf of" variable'
4. Variable set "Peo Software Request " -> "Device name", "organization " variable
1.
2.
3.
4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 11:26 AM - edited 11-13-2023 12:00 PM
Hi @Averyy ,
Replacing the sys_id will not work here because this sys_id belongs to one of option with ( i.e. Me ) is(dyanamic) operator. If you check the same in list-view over the cmdb_ci_computer table , you will find there are 3 default options as below and this sys_id belongs to "Me".
As variables are distributed in different variable set, better to write catalog client script at catalog level using GlideAjax. Same will apply for sam_organization variable, which table it is referring?
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:51 PM
Thank you for that insight, the computer table is cmdb_ci_computer, while the organization variable drop down list is is referencing u_peo_aviation_org_relationship table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:56 PM
Are you good with GlideAjax code or need more help on code part.
-Thanks
AshishKMishra
Please accept solution and mark helpful if it helps you.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 02:50 PM
Yes, I need more help lol