- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2023 09:10 AM - edited ‎08-10-2023 09:16 AM
Set a mandatory Catalog Item Field to non-mandatory upon selection of another choice/field
Hi Helpful Community friends,
I'd really appreciate your help/guidance, on the simplest way to achieve this, I am guessing it is quite straight forward, either via catalog UI action/policy or catalog client script, or perhaps a combination of both ?
Please see my attached screenshots as guidance.
I have a Catalog Item for requesting New Hardware.
The 'Select User' (Reference) field - I want to make this field Mandatory.
There is also a Catalog variable which asks 'Is this equipment for a new starter', where one can select 'Yes/No'.
When one selects 'Yes' a new box/field appears, allowing the name of the New Member of staff to be typed in manually.
I need to make the 'Select User' (Reference) field mandatory, however when someone selects 'Is this equipment for a new starter' = Yes and populates the New Member in the text box that appears, I need the Mandatory setting on the 'Select User' variable to be set to Non-Mandatory (to allow for Catalog form submission, in such a scenario).
This will ensure the Catalog item can be submitted and not require Mandatory population of the 'Select User' field, in the scenario where the user is a new member of staff, if that makes sense.
So basically, the 'Select User' variable needs to set to non-mandatory, as soon as 'Is this equipment for a new starter' = Yes.
Many thanks for any help and guidance, always appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2023 11:30 AM
Try UI policies first, but watch out for odd behavior related to the default value of your variables. Make sure the policies are enforcing the behavior you want for the value that is the default for a given variable. So if New Starter defaults to No, check that the policies are enforcing visible/mandatory on the other fields as designed. And set the run order on your policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2023 11:30 AM
Try UI policies first, but watch out for odd behavior related to the default value of your variables. Make sure the policies are enforcing the behavior you want for the value that is the default for a given variable. So if New Starter defaults to No, check that the policies are enforcing visible/mandatory on the other fields as designed. And set the run order on your policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2023 12:58 PM
Thanks very much Thomas, this was exactly what I needed and I have managed to resolve this now, as per your guidance and advice. Very much appreciated kind sir, thanks for taking the time to help me.
Kindest Regards. 🙂