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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,175)