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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Different types of acc...
Power Apps
Unanswered

Different types of account

(0) ShareShare
ReportReport
Posted on by

Hello,

 

Is it possible to create two different types of account on an application?

 

example : email address A can only access to the section A and the email address B can only access the B section.

 

Each office account connected to the application will only be able to access a single section according to what it has been assigned.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    Hi @Anonymous ,

    The built-in User().Email will give you the logged in user. You just need a reference list, look this up and navigate to the relevant area depending on the result. If this list was called SectionList with fields UserMail and Section, you would do this at App OnStart

    Set(vUserMail,User().Email);
    Set(
     vSection,
     Lookup(
     SectionList,
     UserMail=vUserMail,
     Section
     )
    );
    If(
     vSection="A",
     Navigate(AScreen),
     Navigate(BScreen)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz ,

     

    before asking you a question I would like to thank you for your quick answer,

     

    Concerning the reference list, how do I create it? I create it as an entity by naming it "SectionList" and I add the UserMail and Section fields to it, is that right?

  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    @Anonymous ,

    Yes - you can call it and the fields whatever you want - you just need to reference the names in the code.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz ?


    ok so now I just created the entity with the two fields,

     

    entity.png

    then I put the code in app onstart, I had some errors

     

    onstart.png

     

  • Verified answer
    WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    @Anonymous ,

    Free-typed - now fixed. You need a break between commands and I left some brackets out (mentioned in the post syntax)

    Set(vUserMail;User().Email);;
    Set(
     vSection;
     Lookup(
     SectionList;
     UserMail=vUserMail;
     Section
     )
    );;
    If(
     vSection="A";
     Navigate(Home_docteur);
     Navigate(Home_patient)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz ,

     

    Thanks, now how do I assign an email address to a section (A or B)? And in the "SectionList" entity, am I supposed to add records to the "section" fields example section A & B ?

  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    @Anonymous ,

    Yes, you have two fields - one for the email address (UserMail) and the other for the section (Section) you want them to be directed to. That is what the Lookup does.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz ,

     

    but before being redirected, the email address must be assigned to a section,right ?
    there I created a record to test, except that I didn't have access to fill the two fields "email & section" logically if I could have put the email and the section in the fields.

     

    Screenshot_4.png

     

    Screenshot_5.png

    in which case the redirection would have worked, right?

     

    So my question is how do I assign an email address to a section, I'm supposed to do it manually, right?

     

  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    @Anonymous ,

    Yes - you have to create the list of emails and what section they belong to. The Lookup will then compare the user's email with the UserMail field and find the matching Section, which will then trigger the navigation accordingly.

    Also is your field name Email or UserMail - you will have to refer to the right name in the code.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz ,

     

    the problem when I want to add a record and he proposes that two fields (name and owner) to modify. It doesn't show me the fields ( section & email )

     

    ADD A record.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard