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

Not works the filter function

I attach an image using the filter function and another one without using it, I need you to do the search based on the sales order (Number in red) 

 

 

Capture5.PNG

 

 

Capture6.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

Now we're getting there...

Change the formula to this:

GroupBy(
    Search(
          AddColumns(OrdenesAbiertas,
                  "txtOrden", Text(ORDEN_x0020_VENTA)
                  ), 
         TextSearchBox1.Text, "txtOrden"),
    "ORDEN_x0020_VENTA",
    "Ordendeventa"
)

We need to convert the numeric to text as the Search function only works on text columns.  The AddColumns function above gives us a valid text column to search.

_____________________________________________________________________________________
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

16 REPLIES 16
Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

Consider changing your formula to the following:

GroupBy(
    Filter(OrdenesAbiertas, ORDEN_x0020_VENTA = TextSearchBox1.Text),
    "ORDEN_x0020_VENTA",
    "Ordendeventa"
)

Alternately, for searching, you can use the following as well:

GroupBy(
    Search(OrdenesAbiertas, TextSearchBox1.Text, ORDEN_x0020_VENTA),
    "ORDEN_x0020_VENTA",
    "Ordendeventa"
)

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.
DavidGarcia1
Level: Powered On

Re: Not works the filter function

This is the result.

 

The main screen has a gallery and a sub gallery, the search must be done from the main gallery which is where the order number comes from.

Filter.PNG

Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

Yes, so that formula should work for you.  Are you having any particular issues with it?

If you want to filter based on items in the subgallery, then just change the field in your filter statement.

_____________________________________________________________________________________
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.
DavidGarcia1
Level: Powered On

Re: Not works the filter function

when the searchbox is empty, dont show me the all orders. Smiley Frustrated

Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

Try this then:

GroupBy(
    Filter(OrdenesAbiertas, 
            If(IsBlank(TextSearchBox1.Text), 
               false,
              ORDEN_x0020_VENTA=TextSearchBox1.Text
              ),
           ),
    "ORDEN_x0020_VENTA",
    "Ordendeventa"
)
_____________________________________________________________________________________
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.
DavidGarcia1
Level: Powered On

Re: Not works the filter function

Now it doesn't work again Lol

 

fail.PNG

Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

Sorry...extra comma in the formula I posted...this is the corrected one:

 

GroupBy(
    Filter(OrdenesAbiertas, 
            If(IsBlank(TextSearchBox1.Text), 
               false,
              ORDEN_x0020_VENTA=TextSearchBox1.Text
              )
           ),
    "ORDEN_x0020_VENTA",
    "Ordendeventa"
)
_____________________________________________________________________________________
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.
DavidGarcia1
Level: Powered On

Re: Not works the filter function

@RandyHayes 

 

Sorry to keep bothering you, but still not showing all orders Smiley Sad

 

dsfwd.PNG

Super User
Super User

Re: Not works the filter function

@DavidGarcia1 

No problem...let's get it working for you.

 

So, this formula you have now will:

1) Show nothing if the text input is blank

2) Show order for anything that exactly matches the ORDEN_x0020_VENTA column. Note: it must match exactly in order to see any results.

 

That is what I had infered from your messages that you wanted - if not, let's revisit.

_____________________________________________________________________________________
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.

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
Users Online
Currently online: 331 members 5,623 guests
Please welcome our newest community members: