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 / O365 Other Users Depar...
Power Apps
Answered

O365 Other Users Department to Dropdown

(0) ShareShare
ReportReport
Posted on by 599

Hi All,

I my i have a Dropdown. 

In that Dropdown i need to Filter All users Department.

Following steps i did for to get a Users Department.

1) i get a all users details from O365 group and store into a Collection.

2) from that collection i filtered all Users mail id and store into another collection.

3) Here only i got an error, icant get a User's Department

err.png

I am using this formula to get a Users department from a collection. here Userprofile(Department.mail) is a Name (Department).
But am getting error.

 

Is this Correct or wrong?

How to get Users Department alone and to link with Dropdown for filter data based on Department?

 

Thanks,

Dhinesh

 

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Dhinesh28R :

    First,let me explain why you encountered this problem.

    The point is that Department.mail is a table.But the formula expect a text value.

    Secondly,please try this formula:

    Clear(Dept);
    
    ForAll(
    
     Department,
    
     Collect(Dept,Office365Users.UserProfile(mail).Department)
    
    )

     Best Regards,

    Bof

  • Dhinesh28R Profile Picture
    599 on at

    Hi @v-bofeng-msft ,

    Thanks For Reply man. Now its Working man.

    Yes man i tried to convert Record to Text. But i couldn't work.

    Now working fine man.

     

    Thanks,

    Dhinesh

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 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard