I want to set batch size as -1

a!localVariables(
  local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 100
  ),
  local!channelManagerData: rule!BGH_QE_GetChannelManagerID(),
  local!dataSubset: rule!BGH_getSupplierTaskPropertyReports(
    pagingInfo: local!pagingInfo
  ),
  local!selectedTask,
  local!data,
  local!selectionIndex,
  local!supplierID,
  local!selectedSupplierID,
  local!selectedSupplierData,
  local!channelManagerChoiceLabels: index(
    local!channelManagerData,
    "name_text",
    {}
  ),
  local!channelManagerChoiceValues: index(
    local!channelManagerData,
    "channelManagerID_int",
    {}
  ),
  {
    a!sectionLayout(
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!dropdownField(
                  label: "Select Channel Manager",
                  choiceLabels: append(
                    local!channelManagerChoiceLabels,
                    "Others"
                  ),
                  choiceValues: append(
                    local!channelManagerChoiceValues,
                    0
                  ),
                  placeholderLabel: "--Select value--",
                  value: local!selectedTask,
                  saveInto: {
                    local!selectedTask,
                    a!save(
                      local!data,
                      index(
                        local!datasubset.data,
                        wherecontains(
                          tostring(
                            local!selectedTask
                          ),
                          touniformstring(
                            index(
                              local!datasubset.data,
                              "c12",
                              ""
                            )
                          )
                        ),
                        {}
                      )
                    ),
                    a!save(
                      local!supplierID,
                      union(
                        index(
                          local!data,
                          "c11",
                          ""
                        ),
                        index(
                          local!data,
                          "c11",
                          ""
                        )
                      )
                    ),
                    a!save(
                      local!selectedSupplierID,
                      null
                    ),
                    a!save(
                      local!selectedSupplierData,
                      null
                    ),
                    a!save(
                      local!selectionIndex,
                      null
                    )
                  }
                )
              }
            ),
            a!columnLayout(
              contents: {
                if(
                  rule!APN_isBlank(
                    local!supplierID
                  ),
                  a!textField(
                    value: "No Task is available on corresponding channel Manager",
                    readOnly: true,
                    showWhen: not(
                      rule!APN_isBlank(
                        local!supplierID
                      )
                    )
                  ),
                  a!dropdownField(
                    label: "Select Supplier",
                    choiceLabels: if(
                      tointeger(
                        local!supplierID
                      ) = 0,
                      "Other Supplier",
                      a!forEach(
                        items: local!supplierID,
                        expression: rule!BGH_QE_getSupplier_ID(
                          fv!item
                        )
                      )
                    ),
                    choiceValues: a!forEach(
                      items: local!supplierID,
                      expression: fv!item
                    ),
                    placeholderLabel: "Select Required Supplier",
                    value: local!selectedSupplierID,
                    saveInto: {
                      local!selectedSupplierID,
                      a!save(
                        local!selectedSupplierData,
                        rule!BGH_getSupplierTaskPropertyReports(
                          pagingInfo: local!pagingInfo,
                          managerID: local!selectedTask,
                          supplierID: local!selectedSupplierID
                        )
                      ),
                      a!save(
                        local!selectionIndex,
                        null
                      )
                    },
                    showWhen: not(
                      rule!APN_isBlank(
                        local!supplierID
                      )
                    )
                  )
                )
              }
            )
          },
          marginBelow: "STANDARD"
        ),
        if(
          rule!APN_isBlank(
            local!selectedSupplierData
          ),
          {},
          a!gridField(
            label: "Select Tasks",
            data: local!selectedSupplierData,
            columns: {
              a!gridColumn(
                label: "Task Name",
                value: index(
                  fv!row,
                  "c0",
                  ""
                )
              ),
              a!gridColumn(
                label: "Process Name",
                value: index(
                  fv!row,
                  "c2",
                  ""
                )
              ),
              a!gridColumn(
                label: "Status",
                value: if(
                  index(
                    fv!row,
                    "c0",
                    ""
                  ) = "0",
                  "Open",
                  "Assigned"
                )
              ),
              a!gridColumn(
                label: "Start Time",
                value: if(
                  rule!APN_isBlank(
                    fv!row.c3
                  ),
                  "",
                  text(
                    index(
                      fv!row,
                      "c3",
                      ""
                    ),
                    "DD/MM/YYYY HH:MM A"
                  )
                )
              ),
              
            },
            pagingSaveInto: local!pagingInfo,
            selectable: true(),
            selectionValue: local!selectionIndex,
            selectionSaveInto: local!selectionIndex
          )
        )
      },
      divider: "BELOW"
    ),
    if(
      or(
        isnull(
          local!selectionIndex
        ),
        length(
          local!selectionIndex
        ) > 0
      ),
      a!richTextDisplayField(
        label: "No Open tasks to close",
        showWhen: if(
          or(
            isnull(
              local!supplierID
            ),
            length(
              local!supplierID
            ) = 0
          ),
          if(
            not(
              isnull(
                local!selectedTask
              )
            ),
            true,
            false
          ),
          false
        )
      ),
      {}
    ),
    a!buttonLayout(
      primaryButtons: a!buttonWidget(
        label: "Close Task",
        submit: true(),
        confirmMessage: "Are you sure you want to close Task?",
        skipValidation: true,
        style: "PRIMARY",
        value: true(),
        saveInto: {
          a!save(
            ri!processId,
            local!selectionIndex,
            
          )
        },
        disabled: rule!APN_isEmpty(
          local!selectionIndex
        ) > 0
      ),
      secondaryButtons: {
        a!buttonWidgetSubmit(
          label: "Cancel",
          style: "NORMAL",
          confirmMessage: "Are you sure?",
          saveInto: ri!buttonValue,
          value: true(),
          skipValidation: true
        )
      }
    )
  }
)

After inserting -1 I am getting with an error like below

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 164]: A grid component [label=“Select Tasks”] has an invalid value for “data”. “data” may not be a datasubset containing the entire data set. Update the “data” parameter to receive only the array of data (such as by indexing into the “data” parameter on the datasubset), or set a batch size to only pass a subset of the data.

After this error i had changed line 166 like below

data: local!selectedSupplierData.data, after placing this error will be resolved, but the challenged I faced that I am unable to close the task after placing batchsize as -1 and line number 166 as local!selectedSupplierData.data.For closing tasks, I am using a complete task smart service.

Thanks in advance

  Discussion posts and replies are publicly visible