web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Admin section based on...
Power Apps
Answered

Admin section based on sharepoint list

(0) ShareShare
ReportReport
Posted on by 909

Hello,

 

Today I thought about idea to make a sharepoint list with one column (People) that would contain a list of app admins.

I added this sharepoint list, and created a button that would provide access to admin functions, but it does not work (added this function to property Visible).

 

 

 

!IsBlank(LookUp('ADMIN_LIST_SP','ADMIN_FULLDATA'.Email=User(Email)))

 

 

Invalid argument type, invalid number of argument expected 0 got 1

ADMIN_LIST_SP= sharepoint list

ADMIN_FULLDATA = sharepoint column people type

 

I also tried this:

 

User().Email in ADMIN_LIST_SP.'ADMIN_FULLDATA'

But this shows that data cannot be converted from Text to record.

 

Is this good idea to make such a validation on Visible of buttons? 

And how can I fix that?

Categories:
  • ham Profile Picture
    Microsoft Employee on at

    Hello,

     

    I would suggest you validate on OnSelect, any specific reason why you are doing this on Visible?

     

    Also are you look for the emails ids stored in the sharepoint list column?

     

    Best Regards,

    Harish M

    Please mark as verified if the answer is helpful. 

  • Elitezone Profile Picture
    909 on at

    @ham 

    I was thinking about something like that:

    When you are on a Sharepoint List (your e-mail in people type field) you can see a toggle - admin context.

    This toogle is by default off and I can use app as a normal user - but when I click this toggle, and make it ON then my admin context make my screen different (I can see more data, and I can delete data that normally I wouldn't be able to - I will make a variable for that on this toggle and make buttons Visible depending on that variable data). I think that this will work, and be quiet logical.

    Normal users don't see a toggle so they cannot switch a context on.

     

    My list that I provided have people field and I want to read from it e-mail to allow admin access.

  • Verified answer
    SaiKrishnaGudluru Profile Picture
    499 on at

    @Elitezone probably you can try this way...

     

    On AppStart - Set(crntUserEmail,User().Email).

     

    OnVisible (of respective screen) - Set(varAdmin,false);If(!IsBlank(LookUp(ADMIN_LIST_SP,ADMIN_FULLDATA.EmailAddress=crntUserEmail)),Set(varAdmin,true),Set(varAdmin,false))

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard