I need a variable preset to a particular choice for only one catalog item.

Andre J
Tera Contributor

I need a variable preset to a particular choice for only one catalog item. find_real_file.png

The variable is apart of a variable set that is on multiple catalog items and I don't want any changes to them only the one catalog item. Which is Classification > UnClass. It should be set by default every time a user opens the catalog. They should see that data prepopulated. 

 

1 ACCEPTED SOLUTION

@Andre J 

You can not populate the values using the UI Policies, the answer that you have marked correct does not relate to the question you have asked.

You would need to create a onLoad catalog client script on that particular catalog item and populate the classification variable with the desired choice.

Please mark reply as Correct/Helpful Thanks!

Regards,

Deepankar Mathur

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Andre J 

you can check the approach mentioned by Deepankar

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Andre J 

You wanted to populate choice for particular catalog item

But the answer marked as correct mentions about UI policy which is not setting the default value

You should use the approach mentioned by @Deepankar Mathur regarding onload client script

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Andre J 

You can not populate the values using the UI Policies, the answer that you have marked correct does not relate to the question you have asked.

You would need to create a onLoad catalog client script on that particular catalog item and populate the classification variable with the desired choice.

Please mark reply as Correct/Helpful Thanks!

Regards,

Deepankar Mathur

Andrei Silva
Giga Expert

@Andre J, You can create a Catalog UI Policy in the Catalog Item that you are using the variable set.

As Catalog UI Policy condition, select your classification = Unclassified. Prefer to create these rules into the specific items rather than into the Variable set itself.

 

Example: (variable set name Basic fields)

find_real_file.png

 

Mark correct if it was helpful 🙂