Configurable Paging Info

 
Expression Functions included:

Main interface:

  • APN_configurablePagingInfo
    • How to use: Add to the interface where paging grid is located
    • Inputs:
      • pagingInfo (PagingInfo, required for page selector and batch size selector): use same pagingInfo as used in the paging grid
      • totalCount (Integer, required for page selector): use same totalCount as used in the paging grid
      • batchSizeLabel (Text, optional, default to "Items per page"): allows customization for the label for batch size selection
      • showWhen (Boolean, optional): allows to hide the whole configurable info interface
      • batchSizeChoices (List of Integers, optional, default to first loaded batchSize of the given pagingInfo + 10,25,50): list of integers for batch size options
      • displayBatchSizeOnly (Boolean, optional): allows to show batch size selection only and hide page selector
      • displayPageSelectorOnly (Boolean, optional): allows to show page selector only and hide batch size selector
      • loadTimeWarningThreshold: (Integer, optional, default to 50): threshold of items loaded per one page before the helptooltip with warning message shows up (Displaying many results at once could increase load time)
      • loadTimeWarningMessage (Text, optional, default to "Displaying many results at once could increase load time"): allow to customize warning message in the helpToolTip after loadTimeWarningThreshold is exceeded

1. Helper Functions (Could be replaced with Appian Common Objects):

  • APN_isArrayEmpty (Returns boolean regarding an array that is or is not empty)
  • APN_isValueBlank (Returns boolean regarding a singlePV if it's either null or has no characters)
  • APN_pagingInfoSort (Returns a PagingInfo with a single Sort.
    • Inputs:
      • startIndex (optional) Default: 1
      • batchSize (optional) Default: -1
      • field (optional) ascending (optional) Default: true )
  • APN_distinctArrayValues (Get the distinct elements from an array)
  • APN_returnArrayLength (Returns the number of non null values in an array of a single type. Returns 0 if the array is null, empty, or blank.
    • Inputs:
      • array (Required): array of any type to determine length of )
  • APN_sort (Given list of strings or integers performs sort)
  • APN_replaceNullValue (Returns nullableValue only if it is not null. Else return replacementValue)

2. Constants:

  • APN_PREVIOUS (Tunnel to previous.png)
  • APN_BEGINNING_DISABLED (Tunnel to beginning_disabled.png)
  • APN_NEXT (Tunnel to next.png) APN_BEGINNING (Tunnel to beginning.png)
  • APN_PREVIOUS_DISABLED (Tunnel to previous_disabled.png)
  • APN_END (Tunnel to end.png)
  • APN_NEXT_DISABLED (Tunnel to next_disabled.png)
  • APN_END_DISABLED (Tunnel to end_disabled.png)
  • APN_N_DEFAULT_BATCH_SIZE_CHOICES (Holds default batch size values {10,25,50})

3. Documents (For page selector navigation):

  • APN_previous
  • APN_previous_disabled
  • APN_next_disabled
  • APN_next
  • APN_end_disabled
  • APN_end
  • APN_beginning_disabled
  • APN_beginning
 
Features

Allows user to easily navigate to different pages in paging grid and allows to change batch size (items per page) in real time.

Pre-requisites

Have a functioning paging grid in a with, add APN_configurablePagingInfo in the same interface with paging grid, have the same inputs for pagingInfo and totalCount both for paging grid and for APN_configurablePagingInfo

Anonymous