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
Resident Rockstar
Resident Rockstar

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.

TS5
Regular Visitor

it does not work 😕

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

 

PG_WorXz10
Resident Rockstar
Resident Rockstar

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.

TS5
Regular Visitor

execution of a unknowen or undefined function

PG_WorXz10
Resident Rockstar
Resident Rockstar

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
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!

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.

Users online (2,045)