cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daniels471
Helper II
Helper II

Powerapps office 365 users

hi 

 

Im trying to have one of my dropdowns which gets a list of all users which have their department as "Staff" and their account is enabled. i used this formula initially which worked "officeusers,Filter(Office365Users.SearchUser(),Department = "Staff",AccountEnabled = true).DisplayName"

however not everyone was there as their department was blank or different to "Staff"

I have since corrected this and allowed the half hour for on prem AD to sync to o365 , I have even checked a user in o365 and their department is now showing correct .

but still the list doesn't update , I cant refresh the data source like you could on a SP list, am I missing something in order to get most recent data ?

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Dual Super User
Dual Super User

Hi @daniels471 ,

May be this will work:

Filter(Office365Users.SearchUserV2().value,Department = "Staff" && AccountEnabled = true)

 

Hope it helps !

View solution in original post

3 REPLIES 3
gabibalaban
Dual Super User
Dual Super User

Hi @daniels471 ,

May be this will work:

Filter(Office365Users.SearchUserV2().value,Department = "Staff" && AccountEnabled = true)

 

Hope it helps !

RandyHayes
Super User
Super User

@daniels471 

If you make any change in your formula, the source will refresh.  So even just making a mistake in the formula and then correcting it will refresh it.

If you are not getting the values you expect, you might consider (in the formula editor) placing your cursor at the end of the SearchUserV2().value (and yes, you should use V2, not the one you have) in your formula and see what the formula editor shows that it is returning.  By clicking on the down arrow in the editor. 

RandyHayes_0-1616514374194.png

you can then see all the data returned and see if it has what you expect.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
daniels471
Helper II
Helper II

brilliant thanks , updating to v2 worked

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,965)