cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

@Anonymous 

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.
Check out my PowerApps Videos too!

View solution in original post

16 REPLIES 16
RandyHayes
Super User III
Super User III

@Anonymous 

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.
Check out my PowerApps Videos too!
Anonymous
Not applicable

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

@Anonymous 

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.
Check out my PowerApps Videos too!
Anonymous
Not applicable

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

@Anonymous 

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.
Check out my PowerApps Videos too!
Anonymous
Not applicable

Now it doesn't work again Lol

 

fail.PNG

@Anonymous 

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.
Check out my PowerApps Videos too!
Anonymous
Not applicable

@RandyHayes 

 

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

 

dsfwd.PNG

@Anonymous 

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.
Check out my PowerApps Videos too!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (65,735)