Access pagination parametes inside a microflow.

0
  Hi,   I am using a web/REST service inside a microflow to get a "data grid" data, and to optimize data access I have parameters to limit the returned number of items. How can I get the pagination parameters (like sort by, start at, limit to...etc) inside a data source microflow feeding a data grid widget?   Thanks
asked
3 answers
1

You can do that using the GridView from the "TreeView and GridView" module from the appstore.

  1. You need a new entity that you call, for instance, PagingContext. You give it three Long attributes: Offset, Limit and Count.
  2. Take the PagingContext as a parameter to your microflow
  3. On the page, add a Data view for the PagingContext that has a microflow datasource that simply creates an empty PagingContext
  4. Add a Grid View to the Data view. In its properties, select the microflow as the source, and select the offset, limit and count attributes
  5. In the microflow, you can now use the Offset (that is, PageSize * PageNumber) and the Limit (PageSize) attributes. The microflow needs to set the Count attribut on the PagingContext, to let the Grid View know how many items there are in total
answered
0

In the retrieve action use

  • From database
  • Custom

 

answered
0

You can use the list operation - sort action activity in your microflow to achieve the sorting bit. This will also influence your 'start at'.

Influencing the actual paging buttons/load more button isn't possible as far as I know, so you'll have to do with sorting your list and if necessary removing items from your list to create a limit.

answered