Showing the First and Last Entries on a Page Using Furniture

EasyCatalog’s Furniture features allow you to populate a box with data for the first or last item on a page after pagination.  Sometimes, however, it’s necessary to display both the first and last records in the same furniture box.  To do this, custom fields must be created to determine which records are on the page and pick out the first and last.

  • Create a new custom field that can be updated with the page number each record is placed on.
  • Create a custom field that will pick out the first record for each page:
The GROUPFIRST command returns the first record in the nominated group (in this case ‘Page’).  It is important to specify the sorting of the records required within the page group to reflect the order of that the records were placed onto the page.  In this case our document was paginated in Manufacturer order, so we specify that for the second parameter to the command.  If the document was paginated in “Category:Subcategory:Manufacturer” order, this would be specified in the second parameter (i.e. you’re effectively specifying how the panel was grouped when the document was paginated). The final parameter specifies what we want to appear in the page furniture (e.g. the name of the first Manufacturer on the page).

  • Create a custom field that will pick out the last record on each page:
  • Finally, create a custom field that will concatenate the ‘first’ and ‘last’ fields together if they’re different, or just the ‘first’ field if they’re the same:

  • This final custom field is the one that should be used in your master page’s furniture:

  • After pagination, the ‘Page’ field needs to be updated with the page number each record is placed on:

  • Now, the furniture needs to be updated using the “Update Furniture” option.  Scripting Module customer can automate this process so that the page number update and the furniture update are automatically executed after pagination.