Show Static Entity record Only with specific Role

hi, 

i have a static entity with 8 records. 1 record (testFee) must only be vissible for users with a specific role (admin of exper role)
The other 7 records must be vissble for evereyone (in a List Record widget)

how can i filter this in a aggregate ?



Hello Twan,

You can achieve this by filtering the aggregate with the role that that you need using the CheckRole function to check if the current user has the role associated with that Record.

For example :

If(CheckRole(userId),true,Feetest.id <> theRecordtohide.id)

And the use that aggregate to populate your list.

Hope it helps !

Paulo Rosário

Hey,

Is it multi tenant application?

Thanks

Yogesh

mvp_badge
MVP

Why is it relevant if it is a multi tenant app?

Hello @Twan de langen 

why you don't put a attribute role.id ?

Or have a action to get that entity and inside the action you put a if, if the user has the the role admin or exper role you send all the list in the output if not you send the list without the record testFee

Hello @Twan de langen 

I attached the oml file .

I Hope it helps!

Thanks 

Vaishnavi Bokade

Static Entity Rocords based on Role.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.