The CreatorCon Call for Content is officially open! Get started here.

Auto-populate variables within variable set on catalog item

Averyy
Tera Contributor

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.

Averyy_6-1699900806709.png

 

2.

Averyy_3-1699900393023.png

3.

Averyy_4-1699900420292.png

4.

Averyy_5-1699900680874.png

 

 

 

 

 

6 REPLIES 6

AshishKM
Kilo Patron
Kilo Patron

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". 

 

AshishKMishra_0-1699903041655.png

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

Averyy
Tera Contributor

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 

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

Averyy
Tera Contributor

Yes, I need more help lol