UI Policies not loading on load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 04:13 AM
Hi all I am after some help on my UI Policies.
I have created several UI policies on a record producer that will make field visable / hidden depending on the answers.
expected behaviour:
Question:Preferred contact method:
Answer: – 1 of 3 choices (Phone, Mobile or Email)
Should default to Email and only the “Raised By Email Address” field should be visible and mandatory.
If the user selects Mobile or Phone then the related field should become visible and mandatory and the other field should disappear
When the form is initially loaded the default value is selected as Email as expected.
However the other 2 fields are also visible and mandatory (for some reason it seems as though the Policy is no running at this stage)
Then if you where to select Mobile instead of Email, email disappears as it should but Mobile and Phone still are visible.
They only disappear and start working as they should once you cycle though the options.
I have checked the "On Load" is set as true
I do have several other UI polices on this record producer and they all seem to work and load on load as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 04:44 AM
Hello @Adil N ,
1.Create 3 seperate ui policies for email, mobile and phone of different order.
2. And add condition for each of those 3 option in each ui policies similar to your ui policy for mobile. additionally if required then you will also add condition for is not other two option in all 3. Ex., if option is mobile "or clause" option is not email and phone.
3. Add 2 more UI actions in each of all three UI policies for the variables that are not need to visible or visible false. EX., for mobile - raised by phone and email is active false . As raised by mobile need to visible true.
For best practices- Clear the other two "raised by" variables values that are not visible when click on one of the option of "Preferred contact method" variable.
Please let me know if extra support needed.
If my solution helps you any way then mark it as accepted and helpful.
Thank You!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 06:27 AM
@Dnyaneshwaree Thank you. I will give this a go and let you know how I get on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 01:51 AM
I have created all 3 UI Policies. and like before it always works once i cycle through the options however not when the record producer is loaded.
in the variable set the 3 variables in question always seem to be set as mandatory and I think that's what's causing the issue, however the option to make mandatory or not is greyed out. I have tried to see if the variable is mapped to any other UI policy which is causing this and that does not seem to be the case as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 05:33 AM - edited 07-01-2024 05:38 AM
Hello @Adil N ,
For Onload, you can use Onload Catalog client script with minimum order than UI policies:
Have you followed step no. 3 that I have added previously related to two more UI actions in each of 3 UI policies to set other 2 variables visible false and mandatory false?
If anything not works you will set all UI policies to active false and simply use only one On change and Onload Catalog client script and add all logic in that script by using get value of the variables and adding if conditions for each option similar to this:
Let me know if you are stuck anywhere.
If my solution helps you any way then mark it as accepted and helpful.
Thank You!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru