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 / Auto-Populate fields b...
Power Apps
Answered

Auto-Populate fields based on other field value entered

(0) ShareShare
ReportReport
Posted on by 135

Auto-Populate fields based on other field value entered - I have a field called Requestor (its a people group column)
and i am trying auto populate the Department based on the Requestor field value.

I tried this fx - Office365Users.UserProfile(DataCardValue12.Selected.DisplayName).Department
and it does not look good, i see a Red x next to Department. 

DataCardValue12 is from the Requestor field

PowerAPP.jpg

 

Help me with the correct fx/formula to get this working.

 

Thank you,

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @Jean_9681 ,

     

    The input parameter is wrong.

    v-xiaochen-msft_0-1621493762539.png

    User principal name= User Id ≠DisplayName

     

    Please try this formula:

    Office365Users.UserProfile(DataCardValue12.Selected.Email).Department

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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

    Hi @Jean_9681 ,

    Try

    First(Office365Users.SearchUser({searchTerm:DataCardValue12.Selected.DisplayName})).Department

     

    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.

  • Jean_9681 Profile Picture
    135 on at

    Thank you so much for taking the time to help me, the formula you suggested did not work however it did remove the red x but the autofill did not work.

  • Jean_9681 Profile Picture
    135 on at

    @WarrenBelz  Thank you  it worked as expected.
    First(Office365Users.SearchUser({searchTerm:DataCardValue12.Selected.DisplayName})).Department

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard