- 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:17 AM
Hi arthur,
Please check the inheri checkbox.
Inherit [Advanced view] | Option for specifying whether extended tables will inherit this UI policy. |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 02:28 AM
Hi Sneha,
Thanks for responding, yes it was the inherit check-box.
Best Regards,
Arthur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 02:17 AM
Hi Arthur,
It is because of the condition you added in the Task UI policy, Please remove the request.request state condition as it is not applicable at task level and it should work. Also if you check inherit check box it will be applicable on all child tables.
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 02:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 02:29 AM
Hi Alikutty,
Your help and the others who responded has been very helpful.
Best regards,
Arthur