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 / Error Setting variable...
Power Apps
Unanswered

Error Setting variable with Office365Users

(0) ShareShare
ReportReport
Posted on by 133

What am I doing wrong?  The command without trying to set it to a variable works perfectly.

 

Screenshot 2022-07-13 223252.png

 

Categories:
  • 365-Assist Profile Picture
    2,327 Moderator on at

    What item and property are you trying to run this on? For instance is it a Button ->OnSelect?

  • robgar Profile Picture
    133 on at

    All I am trying to do is create a variable that I can pass to a power automate flow later in the application via a submit button. I can get this same info in the flow, but I am trying to streamline the process by setting variables in the app vs in the flow.

     

    EDIT:  Sorry, I didn't fully answer your question .. which made me re-evaluate where i did have it .. so here's the update.

     

    Using the On Visible property of a screen I am pulling in textInputEmail_1 value from the previous screen.

    Set(varTest,Office365Users.ManagerV2(textinputEmail_1.Text))

     

    Then I created a test label to show this value and in the Text property I put in varTest

     

    For whatever reason, the test label errors stating that it is expecting a text value (I think it's getting data type record).  So I guess the real question is how do I get this manger's alias as a text vs a record value?

     

     

    I have the email of the person I am trying to get the manager of (that's in labelEmail_1) .. so using that info I want to also grab their manager's email to use in the flow for email sending purposes.

     

    Does this help?

  • 365-Assist Profile Picture
    2,327 Moderator on at

    Works fine for me on a Button. Its probably a problem because which Property you are trying to use it on.

    365Assist_0-1657767937854.png

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • robgar Profile Picture
    133 on at

    I got it ...  Text(varTest.mail) in the label.

     

    Appreciate your assistance!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard