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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,538)