I am creating an app that has 3 roles, Admin, Initiator and User.
All three roles need to start on a different screen, my thought was to create two collections one to identify if the user is an Admin and one to identify if the user is an Initiator, if they are neither they start on the Home Screen but if the are Admin or Initiator they are directed to their respective admin screens. I tried to do this with !IsBlank(collection) but the StartScreen property does not allow collections nor does it allow global variables does anyone have any solution?
OnStart:
Collect(col_UserTasks, Filter('Document Control Audit List', 'Created By'.Email = User().Email));
Collect(col_AdminTasks, Filter('Document Control Audit List', Approver.Email = User().Email));
StartScreen:
If(!IsBlank(col_UserTasks), "User Screen", !IsBlank(col_AdminTasks), "Admin Screen, "Home Screen")
Hi @NicolleAbrahams! Try the following in the App.StartScreen property:
If(
CountIf('Document Control Audit List', Lower('Created By'.Email) = Lower(User().Email)) > 0, 'User Screen',
CountIf('Document Control Audit List', Lower(Approver.Email) = Lower(User().Email)) > 0, 'Admin Screen',
'Home Screen'
)
Just an FYI, I typically use Upper() or Lower() to verify email addresses are the same since Power Apps tends to see "Cat.Schneider@..." not equal to "cat.schneider@..."; also, use a single quote around the Screen names for it to recognize the screens you are referencing in the formula bar. Let me know if this works out for you!
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |