I'm new to PowerApps but am pretty code savvy (heavy Microsoft VBA background). I have an app sheet with 10 comboboxes that help to filter data in a data table lower on the screen (source is 'tblMAINDATA' - a SP list). The filter is working fine to update the data in the table, but I've created a label to show "XX records out of 115" and the XX is just not updating as expected. If I select 1 combobox item, it's accurate, if I select a second one, it seems to be an "additive" answer and increase the count even when the table shows less matching results, rather than a count of the actual records that meet ALL criteria. I seems to be pretty close, but I must be not accounting for an AND or OR condition to correctly get the total rows (or records) that match.
I've tried the second part of the code with both an AND and OR condition with no success.
Here's what I have in the label as the "ITEM" formula:
cboApproved.Selected.Result = Approved,
cboActive.Selected.Result = Active,
cboFranchise.Selected.Result = Franchise,
cboCustomerFocusedArea.Selected.Result = CustomerFocusedArea,
cboDeviceTechnologyFunction.Selected.Result = DeviceTechnologyFunction,
cboOriginalManufacturer.Selected.Result = OriginalManufacturerOM,
cboFDAProdCode.Selected.Result = FDAProductCode,
cboFDAProdDescription.Selected.Result = FDAProductDescription,
cboDHFCode.Selected.Result = DHFCode,
cboDeviceSpecificTradeName.Selected.Result = DeviceSpecificTradeName
& " records out of " & CountRows(tblMAINDATA)
Thank you all in advance.
Solved! Go to Solution.
Well, it seems like a lot of steps, but it is well described in the instructions, so it should go quickly - and it will save you the conversion to the gallery.
The gallery is preferred over the datatable as you will have more control over it. But, there is the price to pay that a gallery is an open slate - you need to add the controls and format as you need. The datatable does have the slight advantage (and it is really only this that it has) of displaying data without having to define anything else.
You can use the datacard Update method I described and expand it as you want. It is only a simple record with a single column for the datatable items. It can have many other column that have many other formulas that will all evaluate dynamically as well. I would recommend only one datacard per larger filter operation as, if they are combined, if one needs to re-evaluate its records, then the other will as well, and that can impact performance. Something to always keep in mind.
So, overall, it is just a choice of where you want to do the work that you need to do to get what you need.
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.