- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 06:30 AM
I'm having trouble diagnosing why my UI Policies no longer work; I have created a custom form with custom buttons that update the stage located on form when selected. The stages that I have so far are "Define", "Design", and "Transition". All of the fields associated with each stage should not be editable when the form is in a different stage, and thus we have to make them read only.
The problem I'm having is that the fields linked with "Define" and "Design" are editable whenever the form is in either stage; however, when the form is in the "Transition" stage everything linked with "Define" and "Design" is read only as expected. All of these UI Policies are set up the same way and I can't figure out why two of them won't work when the last one does. I have disabled all associated client scripts on this table and other UI Policies on this table making fields mandatory, and I still have the same issues.
Out of curiosity, I set the UI Policies to hide the variables that are supposed to be read only on certain stages; the UI Policy successfully hides these fields. I checked the console log to see if anything was being tripped up and found that my condition for the UI Policies was being triggered and that the console log says that the fields are being set to read only... obviously that's not happening.
Is there any other area that I'm missing that may be causing the issue?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 08:40 AM
Hi Caitlyn,
I would recommend the following for making fields read only:
1. ACLs - Access controls are great because they run on the server and apply to both forms and lists. However, if you need the mark something read only based on a change on the form, they won't work.
2. UI Policies - These are nice because they require no scripting and you can order them. They also support pretty complex conditions, but they only really work for a condition or the opposite of that condition, so if you have a number of different conditions that have more than 2 outcomes, you might need to use a client script.
3. CS are all scripting so they can be more difficult to work with, but they can do everything a ui policy can do and more.
From your description it sounds like you might still be able to use a ui policy. Could you do something like:
Condition: Stage is 1 or 2
Action: Field is read only
And just separate it out in its own ui policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 07:20 AM
Hi Caitlyn,
Can you please try by selecting the "Reverse If False" check box on your UI policies.
Thanks,
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 07:42 AM
Ganesh,
Unchecking or checking this field sadly does nothing for the UI Policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 07:48 AM
Then your conditions might be failing. Can you please put the screenshots/detail of those ui policies that are failing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 07:53 AM
Ganesh,
If I look into the console log, I can see that my conditions are actually returning "true", but the fields are still editable:
These are the fields that are supposed to be read only:
And this is the console log showing that the conditions are being returned true: