cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TS5
Regular Visitor

Filter not working

Hi Guys,

i'm quite a newbie to Power Apps, therefore im making some dumb mistakes.

It would be awesome, if you could guide me the way to success. In this particular case, I've got a problem with filters, the Datasource is a Share Point list.

Somehow it does not work...

You can find the ScreenShots attached.

 

BR

Torben

 

11 REPLIES 11
BCLS776
Super User
Super User

Can you tell us more about how you want your filter to function? Your filter appears to be attempting to show empty or blank records, plus an unusual condition of:

BCLS776_0-1632582181947.png

which is likely to generate an error. "Status" is a string, and ComboBox1.SelectedItems is a table. Instead, are you instead looking to filter results using a column called Status?

 

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
TS5
Regular Visitor

Hi Bryan,

 

Indeed, I'm trying to combine two filters, "RTV-Vorgang" which is a String. And then the ComboBox. "Status" is a Column in a Sharepoint list.

 

Is there a possibility to solve this problem?

Torben

OK, try this:

Search(
    Filter(
        Fehlerprotokoll;
        Status in ComboBox1.SelectedItems.Value
    );
    TextInput1.Text;
    "RTV_x002d_Nummer"
)

Depending on the type of column for Status, you may need to reference Status.Value instead of simply Status in this code. In addition, if your combobox's Items property was populated using the Distinct function, you may need to put in .Result instead of .Value.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
TS5
Regular Visitor

Cheers Bryan, it does work 😄

 

- but if nothing is selected in the ComboBox and something in the TextBox is written, there are no results shown. As well if both are empty, im not able to see any gallery entries.

 

BR

TOrben

PG_WorXz10
Community Champion
Community Champion

Hi @TS5 ,

 

Not tested but you can try the below code if it helps in your requirement. 

 

if(!IsBlank(TextInput1.Text),Search(
   if( !IsBlank(ComboBox1.SelectedItems.Value),Filter(
        Fehlerprotokoll;
        Status in ComboBox1.SelectedItems.Value
    ),Fehlerprotokoll);
    TextInput1.Text;
    "RTV_x002d_Nummer"
), if( !IsBlank(ComboBox1.SelectedItems.Value),Filter(
        Fehlerprotokoll;
        Status in ComboBox1.SelectedItems.Value
    ),Fehlerprotokoll))

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

it does not work 😕

but i can not tell you why? - maybe there are some brakets missing?

 

PG_WorXz10
Community Champion
Community Champion

Hi @TS5 ,

 

What is the error message your getting ?

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

execution of a unknowen or undefined function

PG_WorXz10
Community Champion
Community Champion

Is below code working for you ?

	Search(
    if( !IsBlank(ComboBox1.SelectedItems.Value),Filter(
        Fehlerprotokoll;
        Status in ComboBox1.SelectedItems.Value
    ),Fehlerprotokoll);
    TextInput1.Text;
    "RTV_x002d_Nummer"
)

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,641)