- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2023 11:11 PM
When I order the service catalog, if only one of the three variables is entered, the other two variables do not need to be entered, so I would like to gray them out. Is there a way to set this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2023 11:24 PM
Hi @Ryota ,
UI Policies allow you to dynamically control the visibility and read-only state of form fields based on specified conditions.
Here's how you can set up a UI Policy to gray out fields when a value is entered for one variable while leaving the other fields editable:
- Create a new UI Policy.
- Provide a name and description for the UI Policy.
- Define the condition for when the UI Policy should be applied. For example, if you have a variable named "Variable A" and you want to gray out "Variable B" and "Variable C" when "Variable A" has a value, the condition could be: current.variables.variable_a != '' (adjust the condition based on your actual variable names).
- Under the "Advanced" section, choose the action "Set Read-only" for the fields you want to gray out (e.g., "Variable B" and "Variable C").
After saving the UI Policy, whenever a value is entered for "Variable A" in the service catalog form, "Variable B" and "Variable C" will be grayed out and set to read-only, indicating that they do not need to be entered.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2023 11:24 PM
Hi @Ryota ,
UI Policies allow you to dynamically control the visibility and read-only state of form fields based on specified conditions.
Here's how you can set up a UI Policy to gray out fields when a value is entered for one variable while leaving the other fields editable:
- Create a new UI Policy.
- Provide a name and description for the UI Policy.
- Define the condition for when the UI Policy should be applied. For example, if you have a variable named "Variable A" and you want to gray out "Variable B" and "Variable C" when "Variable A" has a value, the condition could be: current.variables.variable_a != '' (adjust the condition based on your actual variable names).
- Under the "Advanced" section, choose the action "Set Read-only" for the fields you want to gray out (e.g., "Variable B" and "Variable C").
After saving the UI Policy, whenever a value is entered for "Variable A" in the service catalog form, "Variable B" and "Variable C" will be grayed out and set to read-only, indicating that they do not need to be entered.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2023 01:08 AM
Hi @Ratnakar7
Thank you for your quick reply. I solved it successfully.