How can I show only limited rows of table content on app screen? ex will show only the first 5 of recently added.
What you can do is create five rows of data cells, each utilizing the functions above. Here is an example to help explain this:
My sample table provides the name and sport of my members. Note: in the table as new members are added they are added as a new row at the bottom of the table.
In my app, here is what I did to pull the last five rows from the table
If you look at the data cell selected above I set my source to =GETROW(Members_List,0,FINDLASTROW(Members_List,"Members_List[First Name]<>%",""))[Sport]
For the data cell that shows soccer this is the formula I used =GETROW(Members_List,-1,FINDLASTROW(Members_List,"Members_List[First Name]<>%",""))[Sport]
The item in my syntax to point out is the offset. The offset of -1 pulls the information from the second to last row. You will want to continue this for the rest of the data cells (ie. offset of -2, -3, etc)
Let me know if this helps or if you have any further questions. I’m happy to help!
This helps a lot thank you @Matt_N! By the way is this also possible for List View instead of block?
It is possible @Mark-01df
A way you can do this is by having a column in your table that provides the entry number. Here is my updated table with this column:
What you can do to automatically insert the entry number is first create a hidden data cell that pulls the entry number of the last row. From there, update your automation to take data from this data cell, add 1 to it, and then write to the ‘Entry Number’ column. Screenshots below:
Once you have the table set up this way, you can create your list and apply a filter on it to show you the last five entries. Here you’d follow a similar idea from my last reply but utilize the FINDLASTROW() function with the FILTER() function.
Overall the idea is to:
1.) insert the entry number in your table as users submit new entries
2.) this enables you to create a filter on your list that refers to the entry numbers, pulling the last five rows.
Let me know if you have any further questions!
I've applied this, but I have a requirement wherein there is an option to view the next 5 items, so on and so forth. Can you help me with this?
Another great question @Mark-01df ! Sounds like you are going with the List View route so I’ll use that as my example here.
What you will want to do is create data cells that will find the proper rows of data. To do this follow the instructions I provided in my first reply that reviews the GETROW() fuction in combination with FINDLASTROW() function. In your case, you will have 5 data cells, screenshot of my example:
Next, you will create another data cell that will filter the table to the correct data by using information in the 5 data cells you just created. Note in my example I named this data cell ‘Placeholder’
Note: you can set the visibility settings as FALSE so that these data cells do not show to the app user.
Next, I set my list source as $[Placeholder]. This results in the list showing data that $[Placeholder] is filtered to.
Now for the piece where you want to be able to click a button and show the next 5, you will want to utilize ‘Update current screen’ on the button. On the button click, I specify to update the data cell on screen with a row that is offset by 5 rows.
As a result, on a button click data shown will shift all rows by 5 showing me the next set of 5 entries. If you want to also include a ‘Previous 5’ button you can follow the same concept but the offset will be 5 instead of -5.
One thing I want to let you know is that if it’s possible for a user to hit the end of the table (there isn’t a “next 5” to display) you can utilize conditional visibility to hide the button.
I hope this help you on your app building journey!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.