cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to Filter a Table

I want to filter the items shown in this list to match the customer number selected.  How do I filter this option?

 

fitlerlist.jpg

14 REPLIES 14
Highlighted
Super User III
Super User III

@MaryT0905 

You can show the Customer Number selected in a table by putting this code in the Text property of the label (assuming it’s a number or text column).

 

Table1.Selected.customerNumber

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

Thank you, however, after trying that formula, it is not quite what I expected.  This makes all the customer numbers in that column show that number.  The list I am trying to filter is a list of invoices that are associated to various customers.  I want it to show only the invoices that match to the corresponding customer number. Any ideas on this?

Highlighted

This is my current formula and error message. filter error.jpg

Highlighted

@MaryT0905 Could you try with: 

Filter(
   DataTable1,
   customerName_Column1 = CustomerName.Text
)
Highlighted

@MaryT0905 

If your customerNumber is a Number value do this

Filter(
   your_datasource_name,
   customerNumber = Value(customerNumber.Text)
)

 

If your customerNumber is a Text value do this

Filter(
   your_datasource_name,
   customerNumber = customerNumber.Text
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

I've tried both of these options, and I keep getting "Invalid Argument type"

 

 

Highlighted

I tried this exact formula, and get invalid  argument type.  Let me talk through this a bit.

 

the data source is the data table, then the first part of the formula is the column I want to filer, there is a space on both sides of the equal sign, and then I put customer name. text, because I want it to pull the value for each name. Is that right?

 

Does it matter that the name comes from the Parent. Default? 

 

MaryT0905_0-1599656361853.png

 

Highlighted

@MaryT0905 Your formula is correct now. It doesn't matter if you put spaces around the equal sign.

 

The problem is that your formula is in the wrong location. I've just noticed from your 1st post that its in a text property. You need to put the formula in the Items property of your table!

Highlighted

@MaryT0905 

Make sure my code is used in the Text property of the label, not the data table itself.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,157)