web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DataTable to show last...
Power Apps
Unanswered

DataTable to show last record

(3) ShareShare
ReportReport
Posted on by 32

Hi,

 

I have an PowerApp showing a datatable. (Excel table). Everytime the user pushes a button, a line to the table will be added. It works fine, but the data table keeps showing the first records so if the user wants to see the new things he will have to scroll down. Is there a possibility that the DataTable shows the last records/the lower part of the table by default?

 

best,.

manuel

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    on at

    This is not possible currently - please create a new feature request in the PowerApps Ideas board for that.

     

    One possible workaround would be to have the items in the table sorted by creation date (if the table currently doesn't have such a column, you'd need to add it) in descending order. This way, when a new item is added, then it would appear on the top.

  • Manuel_O Profile Picture
    32 on at

    Thank you, this is a good idea.

    As a beginner in PowerApps, I'm just not sure how to achieve this.

     

    I tried as a behavior in Browse Screen 1 - on visible:

     

    SortByColumns(Tabelle2;"Stamp",SortOrder.Descending)

    But nothing happens. Maybe a syntax-fault?

     

    best,

    Manuel

  • CarlosFigueira Profile Picture
    on at

    You can have this expression in the Items property of your data table:

    SortByColumns(
     Tabelle2;
     "Stamp";
     SortOrder.Descending)

    When you use the SortByColumns function (and most other table-related querying functions), it doesn't change the underlying table; instead, it will return a new collection (table) with the sorting applied. So if you want to display a sorted collection in your data table, you apply the sort right there where it needs to be used (in its Items property).

  • Community Power Platform Member Profile Picture
    on at

    While I use Data Table "in a pinch" to quickly check my data (and thankfully with a recent update several weeks ago, it no longer seems to hold stale data, but now refreshes properly :-)), due to its many limitations, I've created custom galleries for this instead.

     

    Its definitely a bit more work to use a gallery in this matter, but gives you a lot more flexibility (ie: can use HTML text in the fields, controls, etc).  Would be nice if there was a template for a "Vertical gallery" but where the default items are spaced horizontally (ie: mimicking a data table).  Would make it easier to add items, but doing so by customizing the gallery isn't too hard. Still more difficult than a Data Table, but I find much better results and more flexibility.  


    Would love to see additional functionality on the Data Table though, as this would alleviate the need for what I'm doing in many cases, such as what you're looking for, etc.  

  • Manuel_O Profile Picture
    32 on at

    The sort formula works on a text field (In/Out), but unfortunately not on that "stamp" field. It seems not to be sorted at all:

    25.01.2018 20:39

    ...

    18.09.2018 12:49

    ...

    15.02.2018 23:33

     

    Data Source is an excel table. I already changed cell formatting to date but is does not seem to have any effect... any ideas?

  • Nuchem Profile Picture
    128 on at

    I reckoned it's either going to be the last modified or the last created so the trick is to remember that a sort function doesn't modify the data source in place; therefore it's got to be used with the ClearCollect to create a new collection out of the sorted data source that you're operating on: 

     

    ClearCollect( dataTableSource, Sort(backEndSource, If(Modified = Created , Created , Modified ) , Descending) );

    Note: I'm using SharePoint lists so they come with 'Created' and 'Modified' fields. 

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard