I am trying to display the Role permissions of all the respective users in the table.
The problem i have now is that it is displaying only the logged in user's role permission & displays it for every row.
The first screenshot is the table i have beside the role column is a email and name column with the users (not included due to protect company privacy)
Hi,
In your first assign node for both logic, is it assigning UserId = Current.UserId? If so, maybe that is why it is happening.
You can try to remove the assignment first, and then run the actions again, to see on screen, at least all the users are being fetched.
Thank you.
The users are being fetched normally , the issue is with the roles column showing the same roles. in the second logic the assign node i used is Userid = GetUsers.List.Current.User.Id , in the first logic the assign node is just use for visibility assignment example : HasServerAdminRole = False. Previously i was using the Userid input parameter to check the roles but after my partner tried his way he created a userdatabase variable instead
(CheckServer_AdministratorRole(UserDatabase.Id) = True)
both had the same outcome so i did not change it back
I used expressions to display the roles the value i set as the DisplayAdmin local variable display cies, display uas etc (created at the screen)
It looks like you're using a different source for the expressions than the one specified in your table's data source.
Can you please show us the sources of both your expressions and table:
I don't have the roles stored in the database (the Users entity is under system and can't be modified) so i'm using local variables to control the value . Not sure if there is another way to do this
Since you're using different data sources for the table and the expressions, there's a mismatch in the data being displayed. Additionally, it looks like you're using a local variable, which holds only a single value.
Because you have a list within a list, I recommend using a separate block to retrieve the roles by using your custom logic. In that block, define an input parameter, either the UserId or the full user record, depending on your logic. Then, in your main screen, use that block inside the list, and for each instance, pass the current item from GetUser.List as the input parameter.
Hi @Glenys Tay ,
As Jun mentioned, the logic you've implemented appears to be tailored for a single user rather than for a list of users. You’ll need to use a ForEach to iterate through and process all users. Additionally, while it seems like you're using the correct source for your list, the expressions you're referencing in the list items don’t seem to match the structure of that source.
Could you please share a screenshot of the source list and the list items so we can take a closer look?
Just so we could understand better,
FetchUserRoles server action
UserDatabase variable
Maybe in the logic, after your FetchUserRoles server action, before the Assign node, you might want to try to add a For/Each, and assign the values to the variables you had created.