Unable to add multiple roles in expression for document records Add button property — Cloud Customer Connect
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

Unable to add multiple roles in expression for document records Add button property

Summary:

With the 25B update, the Document Records page now includes a property that allows us to either hide the Add button for everyone or keep it visible for all users. According to Oracle documentation, we can also use an expression to selectively show or hide the Add button based on user roles.

We successfully used the following expression to check for a single role:

[[ $application.user.roles.includes('ROLE1') ? 'Yes' : 'No' ]]

However, when we tried to check for multiple roles using:

[[ $application.user.roles.includes('ROLE1','ROLE2','ROLE3') ? 'Yes' : 'No' ]]

it only checks for the first role and ignores the others. Could you please advise how to modify the expression so it checks for multiple roles and shows the Add button if the user has any of the specified roles?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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