
Announcements
I am Working on Employee Promotion Process in my Canvas power App In a dataverse table i Have Employee table which has records of Eligible employees For Promotion .
I have 3 roles Admin, Nominator(3 level,Nominator1,Nominator2,Nominator3) , and Approver (3 levels, Approver1,Approver2,Approver3),
If Nominator1 Selects Few Employees for Promotion,
SO if Nominator2 logsin the app he should she employees nominated by Nominnator1
and if Nominator3 logsin the app he should she employees nominated by Nominnator2 only
And if Approver1 logs in he should she list of employees nominated at level 3 ,
And if Approver 2 logs in he should see only list approved by Approver1 and
Approver 3 should be able to approve or reject or review submitted by both Approver 1 and Approver 2
how do I get different access in a single canvas app
like if any level of nominator logs in the app he should not see screens or actions what Approvers is doing
And Admin can have access to all nominator levels and approver levels
please help how to I achieve this as this is my first project with data verse tables
@Nida_Sayedi - assuming you have actually set up Security Roles for these users, you can use Power FX expressions to identify what Security Role the logged user has been assigned.
For example, you can initialise a Global Variable on the OnStart property of your App to validate if the logged in user has been assigned a specific role:
Set(
hasAccess,
With(
{
userRole: Distinct(
LookUp(
Users,
'Primary Email' = User().Email
).'Security Roles (systemuserroles_association)',
Name
)
},
"System Administrator" in userRole
)
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan