cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaryT0905
Super User
Super User

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
mdevaney
Super User
Super User

@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."

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?

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

@MaryT0905 Could you try with: 

Filter(
   DataTable1,
   customerName_Column1 = CustomerName.Text
)

@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."

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

 

 

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

 

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

@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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,008)