- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 09:12 AM
Hi all,
need a help how to display choice field values based on another reference field table "sys_choice_set" - in Catalog Item
for example - we have have variable called "type" and it is a select box and it has 4choices those are - A,B,C,D
and we have have another variable "type-2" and it is reference field "sys_choice_set" table and in the choices we have 1-100 choices
if we select type = A and "type-2" should show 1-20 choices
if we select type = B and "type-2" should show 21-40 choices
if we select type = C and "type-2" should show 41-70 choices
if we select type = D and "type-2" should show 71-100 choices
Could anyone please help on this.
Thanks in adavance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 03:15 PM
To achieve this functionality, you can use a UI Policy in ServiceNow. Here are the steps to implement the UI Policy:
Create a new UI Policy: Go to the "UI Policies" module in the ServiceNow instance, and create a new UI Policy.
Define the conditions: In the conditions section of the UI Policy, define the condition to check for the value of the "type" variable. For example, if the "type" variable is a choice list with values A, B, C, and D, you can use the following condition:
Type is A
Type is B
Type is C
Type is D
Define the actions: In the actions section of the UI Policy, define the action to be taken when the condition is met. For each of the conditions, define the action to show or hide the choices in the "type-2" variable.
For example, if the "type-2" variable is a reference field to the "sys_choice_set" table, and you want to show choices 1-20 when "type" is A, you can use the following action:
Show/Hide
Type-2
is
Reference field
sys_choice_set
Condition
choice_value BETWEEN 1 AND 20
Repeat this for each of the conditions, adjusting the "Condition" parameter accordingly.
Save the UI Policy: Save the UI Policy and test it out by creating a catalog item and selecting different values for the "type" variable. The choices in the "type-2" variable should be updated based on the selected value for "type".
I hope this helps you achieve the desired functionality in your ServiceNow instance.
Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 03:15 PM
To achieve this functionality, you can use a UI Policy in ServiceNow. Here are the steps to implement the UI Policy:
Create a new UI Policy: Go to the "UI Policies" module in the ServiceNow instance, and create a new UI Policy.
Define the conditions: In the conditions section of the UI Policy, define the condition to check for the value of the "type" variable. For example, if the "type" variable is a choice list with values A, B, C, and D, you can use the following condition:
Type is A
Type is B
Type is C
Type is D
Define the actions: In the actions section of the UI Policy, define the action to be taken when the condition is met. For each of the conditions, define the action to show or hide the choices in the "type-2" variable.
For example, if the "type-2" variable is a reference field to the "sys_choice_set" table, and you want to show choices 1-20 when "type" is A, you can use the following action:
Show/Hide
Type-2
is
Reference field
sys_choice_set
Condition
choice_value BETWEEN 1 AND 20
Repeat this for each of the conditions, adjusting the "Condition" parameter accordingly.
Save the UI Policy: Save the UI Policy and test it out by creating a catalog item and selecting different values for the "type" variable. The choices in the "type-2" variable should be updated based on the selected value for "type".
I hope this helps you achieve the desired functionality in your ServiceNow instance.
Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2023 12:01 AM
Thank you Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2023 12:03 AM
Thank you Punit!