How to display only the latest result instead of all result in a list view

  • 11 January 2017
  • 5 replies

Badge +6

Dear all,


I have a list view, but it is showing all the record. How to display only the latest result instead of all result in a list view?


My user only need to see the latest result instead of all.


Thank you.


Best answer by MickiC 11 January 2017, 14:55

View original

5 replies

Badge +7

Assuming your data has a collumn that can be used to sort and filter you can use the form rules. In the "View Execute intialize" rule for the form it will be calling the smartobject associated with the list. Usually "then execute the list method" Click configure. You will see 5 tabs

1) Input mappings - can be used to get only the newest data

2) Filter - can be used to filter resultd, filter different than inout in that you have more operators (input is just equal to)

3) Output mappings - puts the data in the fields

4) Sort - will allow you to sort the data by one or more columns


I hope this helps

Badge +6

Hi MicKiC,


Thank you for your reply.


I had did something as below:

1. Enable paging for the list view with display 1 item per page.

2. When the form initialize, perform getlist for this view and sort the date creation descending.


So the list view will only display the latest result. But when user click on next in the paging, they can see older result.


Thank you.



Badge +9

Hi foo_yk,


To hide footer you can use javscript or Jquery on  div having class "Grid-footer" of this Grid.




<script>$(document).ready(function() {$('.grid-footer').css('display','none');});</script>




Badge +4

Not sure why you would use a list view if you know ahead of time you only want to display 1 record.  If you switch to an item view, you can call GetList on a SmartObject an it will retrieve the "first" record.  The "first" record takes into consideration any sorting you specified in the GetList call.  If you need the most recent entry and can do an appropriate descending sort, you should get the record you need.



Badge +2
Thanks Steve. Worked well.