I have a dataverse table Payroll which contains records of all months for two companies.(monthname, company, employee, paydetails) . I want to display only the most of recent records of a particular company in modern table control,
If I use MAX(modifiedOn) together with filter function, I get delegation warning. Please help!
Filtering most recent records in modern table control
Thank you for time @Mark, @ANB.
@Mark, Now FirstN selects only 1 record. I need to show the payroll for all employees in the selected company.
@ANB, yes i tried with MAX, it showed delegation warning. In the example link it shows the fix for date range, but i need max(date) , is there any workaround for it ?
Filtering most recent records in modern table control
One way to do this, if you want to be able to select a company and see the most recent records in your table control, is to use a DropDown or ComboBox to select the company you want. Then you just need to filter your results by that company and sort it by "modifiedon".
If you wanted to get only the most recent payroll record for a select company, the "Items" expression for your table would look like this:
If you wanted to see a list of only the most recent payroll for each company, you could create a gallery for your companies. Each company is in the collection that goes in the "items" of your gallery. Then for each gallery item you can insert a table control that filters for the FirstN() of all Payroll records for the current company.
Here I have a gallery of US States in Dataverse, and for each State I've included a Table Control showing the top 3 cities by population for that state.
My items expression for each table in the gallery is:
Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
Thanks,
ANB
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.