cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ajennings1
Resolver I
Resolver I

Search Gallery by first letter in Title

I have a standard gallery with a number of items. Each item has a title, in this case the Project Title. If I take the default search function from the default app and try to search for an item, in seems to filter based of both words.

For example,  if i have the items with the titles:

"Project One"

"Project Two"

"Project Three"

then I type into the search box the letter 'o', the first gallery item will appear because the second word in it starts with the letter 'o'. 

Instead, I want to search items based of the very first letter, so if i typed in 'o', no records will appear as they all start with 'P'.

 

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hey!

 

Please refer to the screenshot below. 

 

MicrosoftTeams-image (7).png

 

The expression used is: 

 

Filter(["Project One","Project Two","Troject 3"],StartsWith(Value,TextInput1.Text))


["Project One","Project Two","Troject 3"]
It is just a sample list, please input your data source directly.

 

Hope this helps!

 

Thanks, 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

v-yuxima-msft
Community Support
Community Support

Hi @ajennings1 

 

As  @yashag2255 's suggestion, you can use Startswith function to achieve that.

Gallery4.Items=Filter(test,StartsWith(Title,TextInput1.Text))  (Gallery4 and Textinput1 is the control name as next screen on my side)

startswith1.PNG

 

Check:

startswith.gif

 

More information:

function-startswith

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

3 REPLIES 3
yashag2255
Dual Super User II
Dual Super User II

Hey!

 

Please refer to the screenshot below. 

 

MicrosoftTeams-image (7).png

 

The expression used is: 

 

Filter(["Project One","Project Two","Troject 3"],StartsWith(Value,TextInput1.Text))


["Project One","Project Two","Troject 3"]
It is just a sample list, please input your data source directly.

 

Hope this helps!

 

Thanks, 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

v-yuxima-msft
Community Support
Community Support

Hi @ajennings1 

 

As  @yashag2255 's suggestion, you can use Startswith function to achieve that.

Gallery4.Items=Filter(test,StartsWith(Title,TextInput1.Text))  (Gallery4 and Textinput1 is the control name as next screen on my side)

startswith1.PNG

 

Check:

startswith.gif

 

More information:

function-startswith

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

@v-yuxima-msft@yashag2255 ,

 

Thank you both for your replies! All working now. Just got confused with Search and Filter. It's odd how the template PowerApp doesn't implement this method.

 

Thanks again.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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