show/hide ui action based on assignment on a different table

polodre2
Tera Contributor

Hi, I have a ui action on a form that should only display if the current user is assigned to a record on a different table.

I have a ui action calling a script include using a condition

polodre2_2-1707148683561.png

 

 

This is what I have in the script include to only show the button on records that are assigned to me

 

polodre2_1-1707148631651.png

having trouble displaying the ui action

1 REPLY 1

Sarika S Nair1
Kilo Sage

Hi @polodre2  

I hope assignment group field in x_1234_agreements_task table is reference to groups table..In that case modify your addQuery like below

grabTaskAssignee.addQuery('assignment_group.name','Agreements Security Reviewers'); // line 4 in script include 

 

also pass current.getDisplayValue('assignment_group') from the UI Action instead of current.assignment_group which will pass only sysid of assignment group and in the last if condition you are checking name.

 

hope this helps