cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cseewald
Regular Visitor

Filter myPeople datasource

Hi

 

My code is not returning records, please assist. I think it may be because of the CompanyName and JobTitle filters? The spinner shows the search seems to be working. How can I get this to run?

 

f(!IsBlank(Trim(txtStudentSearch.Text)), Sort(Filter(Office365Users.SearchUser({searchTerm:Trim(txtStudentSearch.Text),Top: 10}),CompanyName = "Cenwood" && JobTitle = "Studention Account"),DisplayName, Ascending))

 

This out-of - the -box code works fine

 

If(!IsBlank(Trim(TextSearchBox1.Text)), Office365Users.SearchUser({searchTerm: Trim(TextSearchBox1.Text), top: 100}))

 

Thanks

 

Christopher

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @cseewald ,

 

There is nothing wrong with the formula itself. 

I think no user meets your conditions and the result is empty.

 

You could go to Azure AD (Here) to check if a user meets your conditions.

1\ Check my users in Azure Ad

v-xiaochen-msft_0-1618818984611.png

 

2\ Add a textinput control 'txtStudentSearch' 

 

3\ Add a combo box control and set its Items property to:

If(!IsBlank(Trim(txtStudentSearch.Text)),Sort(Filter(Office365Users.SearchUser({searchTerm:Trim(txtStudentSearch.Text),Top:10}),CompanyName="Cenwood"&&JobTitle="Studention Account"),DisplayName,Ascending))

v-xiaochen-msft_1-1618819058779.png

 

4\ The result is as follows:

v-xiaochen-msft_2-1618819078095.png

 

 

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

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @cseewald ,

 

There is nothing wrong with the formula itself. 

I think no user meets your conditions and the result is empty.

 

You could go to Azure AD (Here) to check if a user meets your conditions.

1\ Check my users in Azure Ad

v-xiaochen-msft_0-1618818984611.png

 

2\ Add a textinput control 'txtStudentSearch' 

 

3\ Add a combo box control and set its Items property to:

If(!IsBlank(Trim(txtStudentSearch.Text)),Sort(Filter(Office365Users.SearchUser({searchTerm:Trim(txtStudentSearch.Text),Top:10}),CompanyName="Cenwood"&&JobTitle="Studention Account"),DisplayName,Ascending))

v-xiaochen-msft_1-1618819058779.png

 

4\ The result is as follows:

v-xiaochen-msft_2-1618819078095.png

 

 

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

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (68,898)