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 / Multiple Variables bas...
Power Apps
Unanswered

Multiple Variables based on Azure AD Groups.

(0) ShareShare
ReportReport
Posted on by 10

Hi All, weather good where you are? 

 

So I have an issues that's annoying me a little. I am going to simplify this down to the basics I what I am trying to do. 

 

I have an App. It has a connection into Azure AD. 

OnStart of the App sets 3 variables. varRequest, varApprove, varPurchase with the follow syntax. 

 

 

Set(varRequst,!IsBlank(AzureAD.CheckMemberGroupsV2(User().Email,["RequestGroupID"])));
Set(varPurchase,!IsBlank(AzureAD.CheckMemberGroupsV2(User().Email,["PurchaseGroupID"])));
Set(varApprove,!IsBlank(AzureAD.CheckMemberGroupsV2(User().Email,["ApproveGroupID"])))

 

 

Then I have 3 buttons. 

B1, Visible, True

B2, Visible, varPurcahse

B3, Visible, varApprove

 

 And finally I have 3 text boxes. 

T1, Text, varRequest

T2, Text, varPurchase

T3, Text, varApprove

 

Each text box shows the value of each variable and each button shows based on the true false value of those variables. 

So T2 show false, So B2 is not visible. T3 shows true, so B3 is visible. 

 

This seems to work fine in the App editor. But when I save and publish the app, it loads all buttons and shows all as true when I run it from PowerApps. The testing user is in Request and Approve but not in Purchase groups. 

 

What am I doing wrong? 

Categories:
I have the same question (0)
  • rb Profile Picture
    835 Super User 2024 Season 1 on at

    I'll start with something basic - have you checked to make sure User().Email is showing the correct value when running the published app?

  • Bobiskey Profile Picture
    10 on at

    So I made some edits and added a label with User().Email in. I changed the parameters a bit and removed the user from the purchase group and in edit shows false false true and displays only the one button. But in the app it still displays all 3. 

     

    I have attached two screenshots of the results. 

     

    Screenshot 1, InEdit.png shows the results for that user in the Edit window. 

    Screenshot 2, InApp.png shows the results for the same user when launching the app. 

     

     

    InApp.png
    InEdit.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard