- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 11:26 PM
Requirement : to run BR when current logged in user is not the problem manager or not belongs to the role "thd pm admin".
Advanced condition:
gs.getUserID() != current.u_problem.u_problem_manager || !gs.hasRole('thd pm admin')
If I give one condition (gs.getUserID() != current.u_problem.u_problem_manager) alone its working
If I give one condition (!gs.hasRole('thd pm admin')) alone its working.
If I give both the condition in advanced condition its not working(OR operators is not working for two condition).
Please suggest immediately.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 01:23 PM
Hi Anitha,
I think you should be using AND instead of OR. Should look like the following: -
(gs.getUserID() != current.u_problem.u_problem_manager) && (!gs.hasRole('thd pm admin'))
Let me know if this worked for you,
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 09:16 AM
Try
(gs.getUserID() != current.u_problem.u_problem_manager) || (!gs.hasRole('thd pm admin'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 11:40 PM
Did you try the above condition ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2018 01:49 AM
Tried && operator, its working fine. Thanks for the suggestion.
Can't understand the logic, if we are using && operators both condition should satisfy then only BR will run but here if im using && operator BR is running if one condition satisfies also.
Why || operator is not working here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 01:23 PM
Hi Anitha,
I think you should be using AND instead of OR. Should look like the following: -
(gs.getUserID() != current.u_problem.u_problem_manager) && (!gs.hasRole('thd pm admin'))
Let me know if this worked for you,
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.