- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 01:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 01:56 AM
Please share the screenshot where you want to do this.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 03:23 AM
HI @Vedavalli
- Select the component or container that needs to have a dynamic visibility
- In the config panel, click the visibility icon
- Click on the script icon
- Set the visibility condition
/** * @param {params} params * @param {api} params.api * @param {TransformApiHelpers} params.helpers */ function evaluateProperty({api, helpers}) { let user_roles = api.context.session.user.roles; let visibility_condition = user_roles.includes("THE USER'S ROLE THAT SHOULD NOT SEE THE ELEMENT"); return visibility_condition; }​
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 01:56 AM
Please share the screenshot where you want to do this.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 02:10 AM
In UI Builder for the component it is showing visibility there it have script .How to hide this component based on custom role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2024 03:23 AM
HI @Vedavalli
- Select the component or container that needs to have a dynamic visibility
- In the config panel, click the visibility icon
- Click on the script icon
- Set the visibility condition
/** * @param {params} params * @param {api} params.api * @param {TransformApiHelpers} params.helpers */ function evaluateProperty({api, helpers}) { let user_roles = api.context.session.user.roles; let visibility_condition = user_roles.includes("THE USER'S ROLE THAT SHOULD NOT SEE THE ELEMENT"); return visibility_condition; }​
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 10:06 PM
Hi @dgarad ,
It is working for OOTB roles but not working for the custom roles. For custom roles How can we achieve component hiding?
thanks in advance