This concern relates to role-based access. I have a User table where the admin can assign specific modules that each user can access. A single user may have access to multiple modules, such as Module1, Module2, Module3, and Module4. These modules are stored as values in the [MODULELIST] column, which is hardcoded in the backend database.
My challenge is finding a way to hide the modules that are not assigned to a particular user, given that the column values are hardcoded.
The "UI DISPLAY" should be based on a slice rather than a table. The slice row filter should omit rows that aren't suitable to the user.
Could you please help me with the slice formula? I tried using the formula below, but since I'm using the OR function, if any module is assigned to the user, all modules are displayed. If no modules are assigned to the user, no items will be displayed.
OR(
IN("AMAX PURCHASE and SALES MONITORING", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , ")),
IN("AMAX FAMILY TREE", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , ")),
IN("TOP UP INQUIRY", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , "))
)
My objective is to ensure that 'AMAX PURCHASE and SALES MONITORING' is the only module displayed in the UI when it is the only module assigned to a user.
OR(
IN("AMAX PURCHASE and SALES MONITORING", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , ")),
IN("AMAX FAMILY TREE", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , ")),
IN("TOP UP INQUIRY", SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , "))
)
Based on the information available in this thread, it looks to me that you could use the following as the row filter expression:
IN([Module], SPLIT(("" & SELECT(Users[module], [email] = USEREMAIL())), " , ")
User | Count |
---|---|
15 | |
11 | |
10 | |
8 | |
3 |