Skip to main content
Nintex Community Menu Bar
Solved

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

  • January 11, 2017
  • 5 replies
  • 86 views
  • Translate

Forum|alt.badge.img+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

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

View original

5 replies

Forum|alt.badge.img+7
  • 136 replies
  • Answer
  • January 11, 2017

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

Translate

Forum|alt.badge.img+6
  • Author
  • 25 replies
  • January 12, 2017

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.

 

 

Translate

Forum|alt.badge.img+9
  • 142 replies
  • January 12, 2017

Hi foo_yk,

 

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

 

Example: 

 

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

 

 

 

Translate

Forum|alt.badge.img+4
  • 26 replies
  • January 12, 2017

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.

 

 

Translate

B5A7
Forum|alt.badge.img+2
  • 10 replies
  • September 6, 2021
Thanks Steve. Worked well.
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings