Paging not working

Hi

This is probably a stupid question, but I have created a Process Report and a Tempo Report from this.  Unfortunately, I cannot page the grid that results.  Can someone suggest what I am doing wrong?

Code below:

a!localVariables(
  local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: -1,
    sort: a!sortInfo(field: "c3", ascending: true())
  ),
  local!refreshCounter: 0,
  local!datasubset: a!refreshVariable(
    refreshOnVarChange: { local!refreshCounter },
    value: a!queryProcessAnalytics(report: cons!CMN_ALL_TASK_REPORT)
  ),
  a!sectionLayout(
    label: "",
    contents: {
      a!gridField(
        label: "",
        labelPosition: "COLLAPSED",
        data: local!datasubset,
        columns: {
          a!gridColumn(
            label: "Task Name",
            value: a!richTextDisplayField(
              value: {
                a!richTextItem(
                  text: {
                    fv!row.c5,
                    "  ",
                    a!richTextIcon(
                      icon: "external-link",
                      caption: "(Opens in New Window)",
                      size: "MEDIUM"
                    )
                  },
                  link: a!safeLink(
                    uri: rule!CMN_getTaskUrlByTaskId(taskId: fv!identifier)
                  ),
                  linkStyle: "STANDALONE"
                )
              }
            )
          ),
          a!gridColumn(
            label: "Status",
            value: a!richTextDisplayField(
              value: {
                a!richTextItem(
                  text: if(
                    fv!row.c1 = 0,
                    "Assigned",
                    if(
                      fv!row.c1 = 1,
                      "Accepted",
                      if(
                        fv!row.c1 = 5,
                        "Paused",
                        if(
                          fv!row.c1 = 8,
                          "Error",
                          "Unknown (code " & fv!row.c1 & ")"
                        )
                      )
                    )
                  )
                )
              }
            )
          ),
          a!gridColumn(
            label: "Assignee",
            value: a!richTextDisplayField(
              value: a!richTextItem(
                text: {
                  if(
                    find("Group:", fv!row.c4) <> 0,
                    a!richTextIcon(icon: "group"),
                    a!richTextImage(image: a!userImage(user: fv!row.c4))
                  ),
                  " ",
                  rule!APN_displayGroupOrUsername(groupOrUser: fv!row.c4)
                }
              )
            )
          ),
          a!gridColumn(
            label: "Assigned",
            sortField: "c3",
            value: a!richTextDisplayField(value: fv!row.c3)
          ),
          a!gridColumn(
            label: "Process Instance",
            value: a!richTextDisplayField(value: fv!row.c2)
          )
        },
        pagingSaveInto: local!pagingInfo
      )
    }
  )
)

Thanks

Irene

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Thanks for the quick response.  Unfortunately, if I use the query parameter in the a!queryProcessAnalytics it just returns an error.  I also note in the Help documentation that a!queryProcessAnalytics only appears to return the first page:

    Would you know if this is why this is happening and if so, what I should be using the return all data?

  • We should not get an error while using a query parameter. your code below with little change as highlighted worked fine.

    Hi Irene,

    your code worked fine with little changes as highlighted.

    a!localVariables(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(field: "c3", ascending: true())
    ),
    local!refreshCounter: 0,
    local!datasubset: a!refreshVariable(
    refreshOnVarChange: { local!refreshCounter },
    value: a!queryProcessAnalytics(
    report: cons!TEST_PROCESS_REPORT,
    query: a!query(pagingInfo: local!pagingInfo)
    )
    ),
    a!sectionLayout(
    label: "",
    contents: {
    a!gridField(
    label: "",
    labelPosition: "COLLAPSED",
    data: local!datasubset,
    columns: {
    a!gridColumn(
    label: "Status",
    value: a!richTextDisplayField(
    value: {
    a!richTextItem(
    text: if(
    fv!row.c1 = 0,
    "Assigned",
    if(
    fv!row.c1 = 1,
    "Accepted",
    if(
    fv!row.c1 = 5,
    "Paused",
    if(
    fv!row.c1 = 8,
    "Error",
    "Unknown (code " & fv!row.c1 & ")"
    )
    )
    )
    )
    )
    }
    )
    ),
    a!gridColumn(
    label: "Assigned",
    sortField: "c3",
    value: a!richTextDisplayField(value: fv!row.c3)
    ),
    a!gridColumn(
    label: "Process Instance",
    value: a!richTextDisplayField(value: fv!row.c2)
    )
    },
    pagingSaveInto: local!pagingInfo
    )
    }
    )
    )

  • Thanks for that.  So, I have changed the code so I no longer receive an error, but it is still not paging past the first page.  Displays a count at the bottom of the page:

    but does nothing when click on the >.

  • Only just noticed that I had the pagingSaveInto set differently.  I have set this back to local!pagingInfo and all works now.  Thanks for your help.