Pagination Arrow in Paging Grid

Hello, 

I have a grid field with paginginfo(1,20) and for large datasets in paging grid the back arrow does not seem to work. However, the next arrow works and we are able to fetch the next dataset with no issues. Any insight is appreciated.

Please find the attached snippet that I have  so far: 

 

=load(
  local!dataSubset : a!dataSubset(
    startIndex: 1,
    batchSize: 1,
    data: {},
    totalCount: 0
  ),
  local!expDataSubset: a!dataSubset(
    startIndex: 1,
    batchSize: 1,
    data:{},
    totalCount: 0
  ),
  local!expdPagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 20
  ),
  local!pagingInfo:a!pagingInfo(
    startIndex: 1,
    batchSize: -1
  ), 
    local!rowData,
    local!selectedRows,
    local!singleLineFlag,
    local!selectedTierValue:"Tier 1",
    local!selectedReasonCode,
    local!selectedFeeReasonCode,
    local!expediteFee,
    local!carbonCopy,
  local!selectedYesNo:null,
  local!partialQuantity,
  local!initiatorComments,
  local!expediteData,
  local!apiErrorMessage,
  local!apiResult,
  local!orderNumber,
  local!gridDataSubset:null,
  local!gridSelection: a!gridSelection(
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: 20,
      sort:a!sortInfo(
        field:"line_id"
      )
    ),
    selected: {}
  ),
with(
  local!datasubset: if(isnull(local!orderNumber),{},rule!EXP_GetExpdOrderLinesByOrdNum(ri!orders.order_number,local!gridSelection.pagingInfo)),
  a!formLayout(
  label: "Initiate Expedite",
  contents: {
    a!textField(
      label: "Order Number",
      labelPosition: "ADJACENT",
      /*instructions: "Please enter an Order Number to proceed!",*/
      value: ri!orders.order_number,
      saveInto: ri!orders.order_number,
      refreshAfter: "UNFOCUS",
      required: true,
      requiredmessage: "Value for Order Number is required"
      /*validations: a!validationMessage(*/
        /*message:"Please enter an Order Number to Proceed",*/
        /*validateAfter: "REFRESH",*/
        /*showWhen: isnull(ri!orders.order_number)*/
      /*)*/
    ),
    /*a!textField(*/
      /*label:"Check Value",*/
      /*value:local!dataSubset,*/
      /*readOnly:true()*/
    /*),*/
    a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Search",
          saveInto: {
            /*a!save(local!dataSubset,rule!EXP_GetExpdOrderLinesByOrdNum(ri!orders.order_number,local!pagingInfo)),*/
            a!save(local!expDataSubset,rule!EXP_GetExpeditedLines(local!expdPagingInfo,ri!orders.order_number)),
            a!save(local!orderNumber,ri!orders.order_number)
          },
          style: "NORMAL",
          disabled: isnull(ri!orders.order_number)
        )
      },
      secondaryButtons: {}
    ),
    a!gridField(
      label: "Expedite Line Section",
        totalCount: if(local!datasubset.totalCount=0,1,local!datasubset.totalCount),
        emptyGridMessage: "Please enter a valid number order number to search for eligible lines ",
        columns: {
        a!gridTextColumn(
          label:"Line Number",
          field:"line_number",
          data:index(local!datasubset.data,"line_number","")
        ),
         a!gridTextColumn(
          label:"Order Number",
          field:"order_number",
          data:index(local!datasubset.data,"order_number","")
        )
      },
        identifiers:index(local!datasubset.data, "line_id" ,  "{}"),
      value: local!gridSelection,
          saveInto: {
            local!gridSelection,
            a!save(
              local!rowData,
              index(local!datasubset.data,
              wherecontains(
      local!gridSelection.selected,
      local!datasubset.identifiers
    ),{})
            )
          },
       showWhen: if(index(local!datasubset,"totalCount","") >0,true(),false()),
       selection:if(index(local!datasubset,"totalCount","") >0,true,false)
    ),
    a!sectionLayout(
      label:"Single Line Request",
      contents: {
    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!textField(
            label: "Line Number",
              value: local!rowData.line_number,
              readOnly: true
            ),
            a!textField(
              label: "Order Number",
              value: local!rowData.order_number,
              readOnly: true
            ),
            
             a!textField(
             label: "Quantity",
              value: local!rowData.quantity,
              readOnly: true
            ),
             /*a!dropdownField(*/
              /*label:"Tier Value",*/
              /*placeholderLabel: "--- Select Tier Value ---",*/
              /*choiceLabels: index(rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_TIERS"),"meaning",null),*/
              /*choiceValues: rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_TIERS"),*/
              /*value:local!selectedTierValue,*/
              /*saveInto: local!selectedTierValue,*/
              /*required: true()*/
            /*),*/
              a!dropdownField(
              label:"Reason Code",
              placeholderLabel: "--- Select a Reason Code ---",
              choiceLabels: index(rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_REASONS"),"meaning",null),
              choiceValues: rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_REASONS"),
              value:local!selectedReasonCode,
              saveInto: local!selectedReasonCode,
              required: true()
            ),
            a!textField(
              label: "Expedite Fee",
              value: local!expediteFee,
              saveInto: local!expediteFee
            ),
               a!dropdownField(
              label:"Fee Reason",
              placeholderLabel: "--- Select a Reason Code ---",
              choiceLabels: index(rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_FEE_REASONS"),"meaning",null),
              choiceValues: rule!EXP_GetEBSLookupValuesbyCode("PANDUIT_EXPEDITE_FEE_REASONS"),
              value:local!selectedFeeReasonCode,
              saveInto: local!selectedFeeReasonCode
            )
          }
        ),
        a!columnLayout(
          contents: {
           
            a!textField(
              label: "Carbon Copy",
              value: local!carbonCopy,
              saveInto: local!carbonCopy
            ),
            a!textField(
              label: "Current Scheduled Date",
              value: local!rowData.schedule_ship_date,
              readOnly: true
            ),
            a!textField(
              label:"Request Date",
                value:local!rowData.request_date,
                readOnly: true()
            )
          }
        )
      }
    )
  },
  showWhen: if(or(isnull(local!rowData),or(length(local!gridSelection.selected)=0,length(local!gridSelection.selected)>1)),false,true)
    )
          
  }
)
)
)

Thanks,

  Discussion posts and replies are publicly visible