- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 01:59 AM
Hi,
I am trying to create a UI Policy to hide the Task table filed 'time_worked' when users who do not have the role 'timecard_user' are looking at Requests.
Unfortunately the UI policy doesn't work when the specified Table is 'Task' (although it does work when the specified table is 'Request') can anyone advise what is wrong with the condition (see screen-shot) or my script?
Thanks,
Arthur
------------------------------------------------------------------------------------
function onCondition() {
// we only want users in the group 'Time Card Users' to see this field
if (g_user.hasRole('timecard_user')) {
g_form.setDisplay('time_worked', true);
}
//Non 'Time Card Users' we dont want to see the field
else
g_form.setDisplay('time_worked', false);
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 02:06 AM
Hi Arthur,
Can you please enable the Inherit checkbox in UI policy. This will applies to the extended tables also.
Please hit like or mark the response as helpful or correct based on the impact!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 02:32 AM
Glad it worked for you, I am just curious to know why UI policy is created on task table if you are using it only on the request level (based on your condition)?
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 03:44 AM
Well the request type was just was just the first one I had set up, I do want it to to a number of different child tables we have created. There are 5 child tables and I assumed that I would need a condition for each of them but as you advised that was not needed. Once the condition was removed the filed is hidden or shown as required so again thanks for the advice
Arthur