Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I am trying to create a dynamic rls , Here is my RLS code
VAR _RLS_Restriction =
IF (
_Roles IN "Region" && [WH_Region] IN _AllowedRegions,
TRUE(),
IF (
_Roles IN "Project" && [WH_Project] IN _AllowedProjects,
TRUE(),
IF (
_Roles IN "Group" && [Agent_Group_Name] IN _AllowedGroups,
TRUE(),
IF (
_Roles IN "Region-Project" && [WH_Region] IN _AllowedRegions && [WH_Project] IN _AllowedProjects,
TRUE(),
IF (
_Roles IN "Region-Group" && [WH_Region] IN _AllowedRegions && [Agent_Group_Name] IN _AllowedGroups,
TRUE(),
IF (
_Roles IN "Project-Group" && [WH_Project] IN _AllowedProjects && [Agent_Group_Name] IN _AllowedGroups,
TRUE(),
IF (
_Roles IN "Region-Project-Group" && [WH_Region] IN _AllowedRegions && [WH_Project] IN _AllowedProjects && [Agent_Group_Name] IN _AllowedGroups,
TRUE(),
FALSE()
)
)
)
)
)
)
)
RETURN
_RLS_Restriction
Also Role column i have created with this dax
Role =
VAR regionname = [Region]
VAR Project = [Project]
VAR _group = [Group]
VAR _Role =
SWITCH(
TRUE(),
regionname <> BLANK() && Project = BLANK() && _group = BLANK(), "Region",
regionname = BLANK() && Project <> BLANK() && _group = BLANK(), "Project",
regionname = BLANK() && Project = BLANK() && _group <> BLANK(), "Group",
regionname <> BLANK() && Project <> BLANK() && _group = BLANK(), "Region-Project",
regionname <> BLANK() && Project = BLANK() && _group <> BLANK(), "Region-Group",
regionname = BLANK() && Project <> BLANK() && _group <> BLANK(), "Project-Group",
regionname <> BLANK() && Project <> BLANK() && _group <> BLANK(), "Region-Project-Group",
"Other"
)
RETURN
_Role
When a user has a single value passed from a range (i.e., a value in any of the three columns and the rest two columns are blank). The RLS works in this case. However, if I want to add a region or project for that user, it gives an error.
The error message I'm receiving is "The function expects a table instead of a string or numeric expression." Or sometimes if i change some context it was saying multiple values supplied where single value was expected.
Any help or insights on how to resolve this would be greatly appreciated. Thank you!
Here is the user table
Emnih | Region | PrLjecH | Group | Role |
158679@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
650309@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
650167@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
162300@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
90474@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
10587@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
650308@nh.mnmphe.cvm | NETHERLANDS | NLne | None | Group |
enic.mnntvm@mnmphe.cvm | FRANCE | NLne | None | Group |
enmnntvm@mnmphe.fn | FRANCE | NLne | None | Group |
cnnimtvpne.nhhn@mnmphe.cvm | FRANCE | NLne | None | Group |
dvminique.vignnnd@mnmphe.cvm | FRANCE | NLne | None | Group |
emihiv.cvhhndv@mnmphe.cvm | FRANCE | NLne | None | Group |
enic.mnntvm@mnmphe.cvm | FRANCE | NLne | None | Group |
gihhem.gunnneh@mnmphe.cvm | FRANCE | NLne | None | Group |
jenvme.guihhnumvt@mnmphe.cvm | FRANCE | NLne | None | Group |
nnbih.mnidi@mnmphe.cvm | FRANCE | NLne | None | Group |
pienne.guimhin@mnmphe.cvm | FRANCE | NLne | None | Group |
tnienny.mueun@mnmphe.cvm | FRANCE | NLne | None | Group |
jguihhnumvt@mnmphe.fn | FRANCE | NLne | None | Group |
jvmefennnndez@mnmphe.em | None | VGRICV - MLNHCEVU | None | Group |
jvmefennnndez@mnmphe.em | None | VGRICV PRLJECH SHIELG - MLNHCEVU | None | Group |
jvmefennnndez@mnmphe.em | None | VLVN | None | Group |
jvmefennnndez@mnmphe.em | None | GLCHLLIB - VIHRé | None | Group |
jvmefennnndez@mnmphe.em | None | GLCHLLIB PRL - VIHRé | None | Group |
jvmefennnndez@mnmphe.em | None | GLCHLLIB | None | Group |
jvmefennnndez@mnmphe.em | None | EGF - CLMPIÈGNE | None | Group |
jvmefennnndez@mnmphe.em | None | EGF - CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | EGF CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | FGJ CCRV - CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | FGJ CCSC - CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | FGJ CCSC VIP - CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | HISCLX - CLMPIèGNE | None | Group |
jvmefennnndez@mnmphe.em | None | INHERIVLE - MLNHCEVU | None | Group |
jvmefennnndez@mnmphe.em | None | LMG - CHVLLN | None | Group |
jvmefennnndez@mnmphe.em | None | MVVF - FLNHENVY | None | Group |
nvnngnm@mnmphe.em | None | VGRICV - MLNHCEVU | None | Group |
nvnngnm@mnmphe.em | None | VGRICV PRLJECH SHIELG - MLNHCEVU | None | Group |
nvnngnm@mnmphe.em | None | VLVN | None | Group |
nvnngnm@mnmphe.em | None | GLCHLLIB - VIHRé | None | Group |
nvnngnm@mnmphe.em | None | GLCHLLIB PRL - VIHRé | None | Group |
nvnngnm@mnmphe.em | None | GLCHLLIB | None | Group |
nvnngnm@mnmphe.em | None | EGF - CLMPIÈGNE | None | Group |
nvnngnm@mnmphe.em | None | EGF - CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | EGF CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | FGJ CCRV - CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | FGJ CCSC - CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | FGJ CCSC VIP - CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | HISCLX - CLMPIèGNE | None | Group |
nvnngnm@mnmphe.em | None | INHERIVLE - MLNHCEVU | None | Group |
nvnngnm@mnmphe.em | None | LMG - CHVLLN | None | Group |
nvnngnm@mnmphe.em | None | MVVF - FLNHENVY | None | Group |