cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Premwong13
Level: Powered On

Search in input box

Dear All, 

First Question

I need my input box, whether those word is capital or small letter, 

the result should came out the same. 

If(TextInput1.Text = "",
Filter(
         MergedCollection,
         If(
            IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
            true,
            Located exactin Where.Selected.Result
         ),
         If(
             IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
             true,
             Category exactin What.Selected.Result
         )), Filter(
MergedCollection,Equip_x0020_Code exactin TextInput1.Text,
If(
IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
true,
Located exactin Where.Selected.Result
),
If(
IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
true,
Category exactin What.Selected.Result
)
) )

Here is my filter on Gallery that I use to filter from 2 DropDown boxs /or/ 1 input and 2 DropDown boxs , 2 cases to use. But I only need only Capital or Small letter.

 

 

IsMatch(Result, "^[a-zA-Z]")),Result))

Sholud I use this one? but I dont know where I should apple it.

 

 

Second Question

However in my input box, I have to type a complete name in order to make the fulter in Gallery works, but I want it

to be like the searching box. Eg. when I type "za", for example, the filter in Gallery should show the lists "zara","zalong", some thinng like this.

But for mine I have to type full name "zalong" in order to filter zalong name

Colud you help me to fix it ? 

 

Best Regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Search in input box

Hi @Premwong13 ,

1)Do you want to filter items regardless capital or small letter in textinput?

I suggest you use Lower() function. Format all the letters to small letter. Then whether the letter is capital or small will not effect the result.

2)Make the field including the letter that you enter. So it should be Textinput.Text in fieldname. 

Try this formula:

If(TextInput1.Text = "",
Filter(
         MergedCollection,
         If(
            IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
            true,
            Located exactin Where.Selected.Result
         ),
         If(
             IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
             true,
             Category exactin What.Selected.Result
         )), Filter(
MergedCollection,Lower(TextInput1.Text) in Lower(Equip_x0020_Code),
If(
IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
true,
Located exactin Where.Selected.Result
),
If(
IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
true,
Category exactin What.Selected.Result
)
) )

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
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
K-A-R-L
Level 10

Re: Search in input box

Hi @Premwong13 ,

 

On your gallery can you should probably filter it using the Search() function:

e.g:  Search( Result, TextInput1.Text, "ColumnName1", "ColumnName2" )

 

This searches the date source for records in which either the ColumName1 or the ColumName2 contains the search string (TextInput1.Text) anywhere within it.

So on your gallery,

If(!isBlank(TextInput1.Text),
    Search(Result, TextInput1.Text, "ColumnName1", "ColumnName2"),
    Filter(
        MergedCollection,
        If(IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
            true, Located exactin Where.Selected.Result),
        If(IsBlank(What.Selected.Result) || What.Selected.Result = "Select All", true, Category exactin What.Selected.Result)),
    Filter(MergedCollection, Equip_x0020_Code exactin TextInput1.Text,
        If(IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All", true, Located exactin Where.Selected.Result),
        If(IsBlank(What.Selected.Result) || What.Selected.Result = "Select All", true, Category exactin What.Selected.Result)
    )

)


Just play with the codes and see if it works.

Best of luck!

 

Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

If you thought this post was helpful, please give it a Thumbs Up.

Highlighted
Community Support Team
Community Support Team

Re: Search in input box

Hi @Premwong13 ,

1)Do you want to filter items regardless capital or small letter in textinput?

I suggest you use Lower() function. Format all the letters to small letter. Then whether the letter is capital or small will not effect the result.

2)Make the field including the letter that you enter. So it should be Textinput.Text in fieldname. 

Try this formula:

If(TextInput1.Text = "",
Filter(
         MergedCollection,
         If(
            IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
            true,
            Located exactin Where.Selected.Result
         ),
         If(
             IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
             true,
             Category exactin What.Selected.Result
         )), Filter(
MergedCollection,Lower(TextInput1.Text) in Lower(Equip_x0020_Code),
If(
IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
true,
Located exactin Where.Selected.Result
),
If(
IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
true,
Category exactin What.Selected.Result
)
) )

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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