I need the Approval State field to be read only unless an approver. The dynamic UI Policy I set up isn't working. Help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 09:44 AM
I need the Approval State field to be read only unless an approver. I set up a UI policy with a dynamic condition but it's just not working and I don't see what the problem is. Help!
Condition:
Approver is(dynamic) Me
UI Action:
State --- Read only is False
It works for the non-approvers, but when I go in as an approver, it's still read only. Oddly enough, when I reverse the UI Action (State - Read only is True) it's editable by everyone whether approver or not. What am I missing?
Thanks for any assistance!
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 09:55 AM
Hi Dale,
What happens when you deactivate the UI policy? Is it always read only.
Can you check the dictionary of the state field, if read-only is ticked. You may also check the ACL on approver table, which may already be restricting it.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 10:42 AM
Hi Sanjiv,
Thanks for your response. When no UI Policy (or inactive), the State field is editable by anyone. The Dictionary entry shows Read Only unchecked and there are no ACL's for the State field.
So I tried this:
Checking Dictionary entry Read Only box, then changed the UI Action on State to be false if Approver is(dynamic) me - that didn't work either. It just made the field read only for everyone.
At a loss what to try next. It seems this should work - it's pretty straightforward.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 10:54 AM
Can you try with a onLoad client script
g_form.setReadOnly('state',true);
if (g_form.getValue('approver')==g_user.userID)
g_form.setReadOnly('state',false);
You may also need a data dictionary, so that, user can't change it from list view.
Instead of client script and data dictionary, I would suggest creating an ACL.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 11:18 AM
Thanks Sanjiv,
ACL won't work unless I can make it dynamic. We can't limit it to a role because certain approval workflows will need to allow different individuals based on CI or other variables in other forms (like Knowledge, where we have different approvers for different categories). So, if we have to allow a certain role to be able to approve, there will be people with credentials to approve changes they shouldn't - depending on the variable.
I'm not thrilled about the prospect of a client script for this - especially when the UI policy seems to be tailor-made for this use case - it just doesn't work for some unknown reason. Also, by data dictionary, do you mean configure dictionary for the field to be read only? Would this also limit approver from being able to edit from list view?
Again - thanks!