- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 07:57 AM
Hi I need to create a UI action to only display a UI action based on the role of the logged in user and the state of the demand (the UI action is on the Demand table).
Here is what I have so far, but it is not working.. any ideas?:
(gs.hasRole('demand_screener') && (current.state == '8' || current.state == '28' || current.state == '-4')) || (gs.hasRole('demand_manager') && (current.state != '8' || current.state != '28' || current.state != '-4'));
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 08:51 AM
have you tried
(gs.hasRole('demand_screener') || gs.hasRole('demand_manager')) && (current.state == '8' || current.state == '28' || current.state == '-4'))
??
...also try taking the integers out of quotes...it may be trying to compare as a string to int (evaluating false, as a result).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 08:51 AM
have you tried
(gs.hasRole('demand_screener') || gs.hasRole('demand_manager')) && (current.state == '8' || current.state == '28' || current.state == '-4'))
??
...also try taking the integers out of quotes...it may be trying to compare as a string to int (evaluating false, as a result).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 10:44 AM
Thank you!! the first line of code you provided works perfectly. Thanks again.