Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood for Oracle Cloud HCM   Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.

For more information, please refer to this announcement explaining best practices for getting answers to questions.

EL Expressions - Possible to have a 'true' and a 'false' within the same statement.

edited Oct 25, 2018 12:38PM in Human Capital Management 6 comments

Summary

Attempting to limit icons to be visible by role and also invisible by role.

Content

Hello,

I am trying to limit an icon using an EL Expression that looks at roles, I'd like to grant permission to the icon for Role1 and Role 2, but hide if a user has Role 3.

#{securityContext.userInRole['ROLE_1,ROLE_2]} and
#{(securityContext.userInRole['ROLE_3'])?true: false} - the validation returns True and False but hides the icon entirely.

It works correctly using each expression individually but not together, its almost as if the expression is saying, ROLE 1, ROLE2 or ROLE 3 = false

Is anybody aware of a way to use both true and false statements within an expression? or another way of limiting an the icon.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!