Forum Discussion

Bhumika9's avatar
Bhumika9
Regular Visitor
2 years ago

RlS and OLS

hello everyone ,

I am tring below and stuck in situation like :

var _Restriction =
CALCULATETABLE(
VALUES(COMPANYMAPPING[CLS 1 ]),
COMPANYMAPPING[Email]=USERPRINCIPALNAME()
)

var _Restriction1 =
CALCULATETABLE(
VALUES(Parameter[PF Fields]),
Parameter[PF Order]=4
)

var RLS_Restriction =
SWITCH(
TRUE(),
_Restriction = "G1",[PF] IN {_Restriction1},

)
Return
RLS_Restriction

Above is RLS role where i am restricting columns but We want to do it dynamic and for that you can see code in bold which I am tring to pass switch case .
"PF Fields" contains coulms that i want restict from parameter table .Like only "Values","Amount" columns wants to show
When hardcoded in switch case like _Restriction = "G1",[PF] IN {"VALUE","Amount"} its is working .
But i have stored in mapping table and now want to pass it in swich satetment so it should work dynamically.

Thanks 
Pooja Dhonde