filter condition is not working in highlighted field value

MarotiR
Tera Contributor

Hi Everyone,

I am trying to enable a condition-specific icon and label in the SOW Workspace on the Name field of the sys_user table.

My requirement is that if a user has VIP = true and the same user is a member of the "SMT" group(javascript:gs.getUser().getUserByID(current.sys_id).isMemberOf('SMT'); the icon and label should appear.

I configured the condition using the highlighted logic shown in the attached screenshot below, but it is not working as expected VIP is true working but another one is not working i have tried with group sys id but still it's not working please suggest anyone what will be condition because there is no script option.

1 REPLY 1

abirakundu23
Giga Sage

Hi @MarotiR ,

To achieve this requirement, you should create a Script Include and configure the filter condition as VIP = true and use another condition VIP =  javascript:new membercheck().ismember() to call the Script Include within the highlighted filter condition, implementing the following logic, in ismember() method to define the following logic : gs.getUser().getUserByID(current.sys_id).isMemberOf('SMT').

The Declarative Condition Builder does not support the GlideSystem object (gs), multiple dot method calls, or conditions like:
gs.getUser().getUserByID(current.sys_id).isMemberOf('SMT')


Please mark helpful & correct answer if it's worthy for you.