How to show value of choice field based on if user is part of assignment group

JAIM
Tera Contributor

1.  i have one choice field
field name: Request and
Values: hardware and software.
when user opens the form if user is part of hardware assignment group then software value should be visible in the field if user is not part of assignment group then hardware value in the field should not be visible

6 REPLIES 6

Hi @Ehab Pilloor 
Thanks for your response,when i follow the above script and with correct assignment group name values in Request are not visible
but only hardware should not be visible when user is not part of hardware assignment group

JAIM_0-1750161259671.png

 

@JAIM 

If assignment group values are not being fetched properly, you can try using sys ids of assignment groups.

 grHardware.addQuery('group', 'SYSID_OF_HARDWARE_GRP');

 grSoftware.addQuery('group', 'SYSID_OF_SOFTWARE_GRP');

This is not a best practice, check if it works this way and you can debug the previous script based on this.

Also double check every backend name in the code.