cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CollabTechie
Responsive Resident
Responsive Resident

Search box and gallery query

Hey Community folks,

My gallery items property is currently this 

 

Sort(UAMentorList, Title, Ascending)

 

I need the following behavior. 

  • If search box contains text filter by that text on title field
  • If search box isblank, filter like this -> Sort(UAMentorList, Title, Ascending) 

 

Appreciate the help.
Thanks,
C

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @CollabTechie ,

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following formula (set the Items property of Gallery to following) :

Sort(
     Filter(
            UAMentorList,
            If(
                IsBlank(TextSearchBox.Text),
                true,
                StartsWith(Title, TextSearchBox.Text)
            )
     ),
     Title, 
     Ascending
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
eka24
Super User III
Super User III

Use

If(IsBlank(TextBox1),
Sort(UAMentorList, Title, Ascending),
Sort(Filter(UAMentorList, Textbox1.Text in Title), Title))

 

Edited

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-xida-msft
Community Support
Community Support

Hi @CollabTechie ,

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following formula (set the Items property of Gallery to following) :

Sort(
     Filter(
            UAMentorList,
            If(
                IsBlank(TextSearchBox.Text),
                true,
                StartsWith(Title, TextSearchBox.Text)
            )
     ),
     Title, 
     Ascending
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors
Users online (72,909)