cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
Post Prodigy
Post Prodigy

Help Filtering combobox that starts with....

I have a gallery.

In my gallery i have a combobox with the value from my datasource (sharepoint list).

Then i have a textfield outside of my gallery

 

I want to filter my gallery based on what i type in my textbox.

This works fine with textbox to textbox filter. But i cant get it to work with the textbox to combobox.

 

I guess i need to convert the data from a record (combobox) to text/string (textbox).

 

But how?

This is my filter formula, the bold text is what i have problems with. The rest works fine.

SortBSortByColumns(Filter('EKAN Informerar';
If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
TextInput2.Text in 'Ange Rubrik på ditt meddelande';TextInput2_1.Text in 'Skriv ditt meddelande';
TextInput1.Text in ValjTeam.Value);"Created";Descending)yColumns(Filter('EKAN Informerar';
If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
TextInput2.Text in 'Ange Rubrik på ditt meddelande';TextInput2_1.Text in 'Skriv ditt meddelande';
TextInput1.Text in ValjTeam.Value);"Created";Descending)

ValjTeam.Value = my column in my datasource that populate my gallery.

TextInput1 = the datafield outside of the gallery where i want to filter the gallery based on what i type.

 

If i type ABC i want all values in the combobox that starts with ABC or contain ABC. This works with textfields but not the combobox. Now i need to type exactly the value of the selection in the combobox.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Oskarkuus 

Ah the power of troubleshooting!!

Your Column is defined as "Checkboxes (allow multiple selections)"

 

First question is, do you need it to really have multiple selections?  If not, easy answer, change the column to not allow multiple selections and your formula will then work fine.

 

If you need the multi-selections in the column, then you'll need to go back to our add columns, but now our formula will be this:

SortByColumns(
         Filter(
                 AddColumns('EKAN Informerar'; "txtValjTeam"; Concat(ValjTeam; Value & ";"));
                  If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
                  If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
                  If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
                  If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
                  If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
                  TextInput2.Text in 'Ange Rubrik på ditt meddelande';
                  TextInput2_1.Text in 'Skriv ditt meddelande';
                  TextInput1.Text in txtValjTeam
                 );
 "Created";Descending)

This should give you the capablity you want on the multi-select column.

 

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

6 REPLIES 6
RandyHayes
Super User
Super User

@Oskarkuus 

What you need to do is to pull the values in the column into something that you can apply that filter to.  In this case, using the AddColumns function will be helpful for you.  Consider the following:

SortByColumns(
         Filter(
                 AddColumns('EKAN Informerar'; "txtValjTeam"; ValjTeam.Value);
                  If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
                  If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
                  If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
                  If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
                  If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
                  TextInput2.Text in 'Ange Rubrik på ditt meddelande';
                  TextInput2_1.Text in 'Skriv ditt meddelande';
                  TextInput1.Text in txtValjTeam
                 );
 "Created";Descending)

This will create a usable column that you can apply your filter logic to.

 

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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I am using your code.  I get no errors....

But nothing happens....

 

What more should i do to make this work?

@Oskarkuus 

Okay, so not so helpful then.   This was a shot based on what might have been the type of column you had.

 

Let's do a little troubleshooting...

First, change your formula to the following:

SortByColumns(
         Filter(
                 'EKAN Informerar';
                  If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
                  If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
                  If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
                  If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
                  If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
                  TextInput2.Text in 'Ange Rubrik på ditt meddelande';
                  TextInput2_1.Text in 'Skriv ditt meddelande'
                 );
 "Created";Descending)

We've removed the reference to the ValjTeam in this scenario.  Do you get results as expected (minus the ValjTeam aspect)?

 

Next, change your formula to the following:

SortByColumns(
         Filter(
                 'EKAN Informerar';
                  TextInput1.Text in ValjTeam.Value
                 );
 "Created";Descending)

We've now focused JUST on the ValjTeam column.  Do you get the results you expect from that?

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Code 1.

It works, i get the everything without any working filter to ValjTeam column.

 

Code 2.

I get no results in my gallery. In my textinput1 i Type a few letters that i know are part of choices in ValjTeam column.

The gallery goes empty direct unless i type the full string of one choice in ValjTeam column.

@Oskarkuus 

Ah the power of troubleshooting!!

Your Column is defined as "Checkboxes (allow multiple selections)"

 

First question is, do you need it to really have multiple selections?  If not, easy answer, change the column to not allow multiple selections and your formula will then work fine.

 

If you need the multi-selections in the column, then you'll need to go back to our add columns, but now our formula will be this:

SortByColumns(
         Filter(
                 AddColumns('EKAN Informerar'; "txtValjTeam"; Concat(ValjTeam; Value & ";"));
                  If(Checkbox2.Value=false;true; Rutin = Checkbox2.Value);
                  If(Checkbox2_1.Value=false;true; Info = Checkbox2_1.Value);
                  If(Checkbox2_2.Value=false;true; System = Checkbox2_2.Value);
                  If(Checkbox2_3.Value=false;true; Tips = Checkbox2_3.Value);
                  If(Checkbox2_4.Value=false;true; Ovrigt = Checkbox2_4.Value);
                  TextInput2.Text in 'Ange Rubrik på ditt meddelande';
                  TextInput2_1.Text in 'Skriv ditt meddelande';
                  TextInput1.Text in txtValjTeam
                 );
 "Created";Descending)

This should give you the capablity you want on the multi-select column.

 

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Awesome. That works!

 

Thank you very much!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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