How to configure a UI policy to hide a field on task on extended tables?

aansell
Mega Expert

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);

        }

1 ACCEPTED SOLUTION

preddy
Kilo Guru

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!


View solution in original post

11 REPLIES 11

snehabinani26
Tera Guru

Hi arthur,



Please check the inheri checkbox.



Inherit

[Advanced view]


Option for specifying whether extended tables will inherit this UI policy.

Hi Sneha,



Thanks for responding, yes it was the inherit check-box.



Best Regards,


Arthur


Alikutty A
Tera Sage

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


Remove the condition highlighted


find_real_file.png



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Hi Alikutty,



Your help and the others who responded has been very helpful.



Best regards,



Arthur