Add task report filters to user interface

Certified Associate Developer

Hi Team
I have an existing report, "All Tasks", which is an ARF file, of course.

I am able to configure filters on the report to customise the report.

My requirement is to show the report in a UI so a team lead can see what tasks have been, by whom, whether it is complete, and the duration of the task.

Downloading the report and converting it to Excel is not an option - the requirement is to view the report on my site.

I have an interface with a read-only grid that returns exactly the information required.

Is it possible to add filters to a report backed UI?

If so, how do I go about it?

Thanks and blessings

Stephen

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi  

    Please go through the link here, It has the pattern from which you can get inspiration.

  • 0
    Certified Associate Developer
    in reply to Sri Ram Kaja

    I have followed all the steps listed here:


     https://appianspace.com/2023/06/29/showing-tasks-on-the-site/

    but am getting the following error:


    errorMessage"The report column specified for the additional filter is not available. (APNX-1-4156-001)"(Text)

    The column does exist and should be available, so I'm a bit stumped.

     , can you shed any light on this?

  • 0
    Certified Lead Developer
    in reply to Stephen Kane

    We can only say anything after looking at all the details that you can share.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    a!localVariables(
      local!datasubset: rule!AT_processTaskReport(
        taskName_txt: ri!taskName_txt,
        status_int: ri!status_int,
        owner_txt: ri!owner_txt,
        assignee_txt: ri!assignee_txt
      ),
      a!sectionLayout(
        label: "",
        labelColor: "SECONDARY",
        contents: {
          rule!APP_uiInterfaceHeader(text: "Tasks Overview"),
          a!sectionLayout(
            label: "",
            contents: {
              a!gridField(
                label: "",
                emptyGridMessage: "No task history available",
                data: local!datasubset.data,
                columns: {
                  a!gridColumn(
                    label: "Reference Number",
                    sortField: "",
                    value: fv!row.c1
                  ),
                  a!gridColumn(
                    label: "Task Name",
                    sortField: "",
                    value: fv!row.c2
                  ),
                  a!gridColumn(
                    label: "Assigned On",
                    sortField: "",
                    value: text(fv!row.c6, "D MMM YYYY, HH:MM")
                  ),
                  a!gridColumn(
                    label: "Assigned To",
                    sortField: "",
                    value: a!richTextDisplayField(
                      value: {
                        a!localVariables(
                          local!showGroupMembers,
                          local!group: if(
                            a!isNullOrEmpty(togroup(fv!row.c14)),
                            null,
                            a!groupMembers(togroup(fv!row.c14)).data
                          ),
                          local!groupMembers: if(
                            a!isNullOrEmpty(local!group),
                            null,
                            a!forEach(
                              items: local!group,
                              expression: a!richTextItem(
                                text: joinarray(
                                  {
                                    user(fv!item, "firstName"),
                                    user(fv!item, "lastName")
                                  },
                                  " "
                                )
                              )
                            )
                          ),
                          {
                            a!richTextItem(
                              text: rule!APP_displayUserOrGroup(fv!row.c14) & "  "
                            ),
                            a!richTextIcon(
                              icon: if(
                                isnull(local!showGroupMembers),
                                "expand",
                                "compress"
                              ),
                              caption: if(
                                isnull(local!showGroupMembers),
                                "Expand group",
                                "Collapse group"
                              ),
                              link: a!dynamicLink(
                                saveInto: if(
                                  isnull(local!showGroupMembers),
                                  a!save(local!showGroupMembers, true),
                                  a!save(local!showGroupMembers, null)
                                )
                              ),
                              showWhen: a!isNotNullOrEmpty(togroup(fv!row.c14))
                            ),
                            a!richTextBulletedList(
                              items: local!groupMembers,
                              showWhen: a!isNotNullOrEmpty(local!showGroupMembers)
                            )
                          }
                        )
                      }
                    )
                  ),
                  a!gridColumn(
                    label: "Claimed By",
                    value: a!richTextDisplayField(
                      value: a!richTextItem(
                        text: a!defaultValue(
                          rule!APP_displayUserOrGroup(fv!row.c14),
                          "-"
                        )
                      )
                    ),
                    align: "CENTER"
                  ),
                  a!gridColumn(
                    label: "Started On",
                    sortField: "",
                    value: text(fv!row.c7, "D MMM YYYY, HH:MM")
                  ),
                  a!gridColumn(
                    label: "Completed On",
                    sortField: "",
                    value: if(
                      a!isNullOrEmpty(fv!row.c8),
                      "Not Completed",
                      text(fv!row.c8, "D MMM YYYY HH:MM")
                    )
                  ),
                  a!gridColumn(
                    label: "Task Duration",
                    sortField: "",
                    value: with(
                      local!interval: tointervalds(fv!row.c9),
                      local!days: tointeger(
                        split(tostring(local!interval), "::")[1]
                      ),
                      local!hours: tointeger(split(tostring(local!interval), ":")[3]),
                      local!minutes: tointeger(split(tostring(local!interval), ":")[4]),
                      local!seconds: tointeger(split(tostring(local!interval), ":")[5]),
                      if(
                        local!days = 0,
                        "",
                        local!days & if(local!days = 1, " day, ", " days, ")
                      ) & if(
                        and(local!days = 0, local!hours = 0),
                        "",
                        local!hours & if(local!hours = 1, " hour, ", " hours, ")
                      ) & if(
                        and(
                          local!days = 0,
                          local!hours = 0,
                          local!minutes = 0
                        ),
                        "",
                        local!minutes & if(
                          local!minutes = 1,
                          " minute, ",
                          " minutes, "
                        )
                      ) & local!seconds & if(local!seconds = 1, " second", " seconds")
                    )
                  )
                }
              )
            }
          )
        }
      )
    )

  • 0
    Certified Lead Developer
    in reply to Stephen Kane

    The reason could be that you have provided the wrong column number there. Try to identify the correct column number (c0, c1, etc) from the data set returned by queryProcessAnalytics and then mention it in the q!queryFilter's field property. 

  • 0
    Certified Lead Developer
    in reply to Stephen Kane

    You are aware that the code of interest is inside "AT_processTaskReport"?

Reply Children
No Data