Want to apply the Regex to the field based on the condition through UI Policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 01:27 AM
Hi All,
Having a requirement that want to apply the Regular Expression to the field based on the condition through UI Policy in the order guide.
having one variable set in the order guide in that the two variables are *First Name and *Last Name
there are two conditions are here like check boxes
1. Existing user(AD)
2. New user
here come the requirement that *If we select the Existing user the First and last name will get to be Auto populated read-only then the Regex will not apply on that and gets error. So Not to apply for this Existing user
If we select the New user only the regex has to apply
so for that trying with ui policy with script. Need suggestion on this.
Regards,
Vinod.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 03:21 AM
Hi
Here you will have to use two UI policies .
- UI Policy 1 : Existing User is true
- Select the advance view and use the run script block to set your values and make them read only in the true script box.
- Also select reverse if false and in the false script bock clear all field values i.e first name and last name and make them read -only false.
2.UI Policy 2 : New user is true
- Select the advance view and use the run script block(true condition) to set your regex validations.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2022 10:28 AM
HI,
Can you help me with the syntax for this to validate the Regex.
Thanks,
Vinod.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 02:21 AM
Hi,
Regex has different validations for different use cases - could you please specify the use case i.e. what kind of validation you want to put on that field !
Regards,
SJ