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

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
Super User
Super User

Re: Help Filtering combobox that starts with....

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Help Filtering combobox that starts with....

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Oskarkuus
Level: Powered On

Re: Help Filtering combobox that starts with....

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

But nothing happens....

 

What more should i do to make this work?

Highlighted
Super User
Super User

Re: Help Filtering combobox that starts with....

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Oskarkuus
Level: Powered On

Re: Help Filtering combobox that starts with....

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.

Super User
Super User

Re: Help Filtering combobox that starts with....

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Oskarkuus
Level: Powered On

Re: Help Filtering combobox that starts with....

Awesome. That works!

 

Thank you very much!!

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,543)