Process Report

Certified Associate Developer

Hi All, 

I am facing an issue regarding process report. I have crated one process report to fetch process history with last seven days and using that process report in a interface, But as per my requirement i need to fetch process history with only two specific process model, not for all processes which i was performed in last seven days, for achieving this i have created one filter in Process report where I am using 

Process= GPA Task Loader by using this i am able to fetch process history but it showing only today history.

So there is any other way to fetch process history for  two process model with last seven days data.

a!localVariables(
  local!statusFilter,
  local!processTask: {
    "GPA Activity Task Loader Excel",
    "GPA Activity Task Loader Excel Validation"
  },
  local!taskReportData: a!queryProcessAnalytics(
    report: cons!POC_GPA_USER_REPORT,
    query: a!query(
      pagingInfo: a!pagingInfo(
        startIndex: 1,
        batchSize: 500,
        sort: a!sortInfo(field: "c3", ascending: false, )
      ),
      logicalExpression: {
        a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "c5",
              operator: "in",
              value: local!statusFilter,
              applyWhen: a!isNotNullOrEmpty(local!statusFilter)
            ),
            
          }
        ),
        a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "c0",
              operator: "in",
              value: local!processTask,
              applyWhen: a!isNotNullOrEmpty(local!statusFilter)
            ),
            
          }
        ),
        
      },
      
    )
  ),
  /* Maps the "c5" / "Status" field values to status names */
  local!taskStatuses: {
    a!map(
      name: "Assigned",
      icon: "user-o",
      color: "#666666"
    ),
    a!map(
      name: "Accepted",
      icon: "user-check",
      color: "ACCENT"
    ),
    a!map(
      name: "Completed",
      icon: "check-circle",
      color: "POSITIVE"
    ),
    a!map(
      name: "Not Started",
      icon: "circle-o-large",
      color: "#666666"
    ),
    a!map(
      name: "Cancelled",
      icon: "stop-circle",
      color: "#fdb858"
    ),
    a!map(
      name: "Paused",
      icon: "pause-circle",
      color: "#666666"
    ),
    a!map(
      name: "Unattended",
      icon: "question-circle",
      color: "#666666"
    ),
    a!map(
      name: "Aborted",
      icon: "minus-circle",
      color: "#fdb858"
    ),
    a!map(
      name: "Cancelled By Exception",
      icon: "times-circle",
      color: "NEGATIVE"
    ),
    a!map(
      name: "Submitted",
      icon: "share",
      color: "ACCENT"
    ),
    a!map(
      name: "Active",
      icon: "spinner",
      color: "ACCENT"
    ),
    a!map(
      name: "Error",
      icon: "exclamation-circle",
      color: "NEGATIVE"
    )
  },
  {
    a!sectionLayout(
      label: "My Tasks",
      labelColor: "SECONDARY",
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!multipleDropdownField(
                  label: "Status",
                  labelPosition: "COLLAPSED",
                  placeholder: "All statuses",
                  choiceLabels: {
                    "Assigned",
                    "Accepted",
                    "Completed",
                    "Not Started"
                  },
                  choiceValues: enumerate(4),
                  value: local!statusFilter,
                  saveInto: local!statusFilter
                )
              },
              width: "MEDIUM"
            )
          },
          marginBelow: "NONE"
        ),
        a!gridField(
          label: "My Tasks",
          labelPosition: "COLLAPSED",
          data: local!taskReportData.data,
          columns: a!forEach(
            items: local!taskReportData.columnConfigs,
            expression: a!gridColumn(
              label: fv!item.label,
              sortField: fv!item.field,
              value: a!localVariables(
                local!fieldValue: index(fv!row, fv!item.field, {}),
                /* Display the data based on its configured formatting */
                a!match(
                  value: fv!item.configuredFormatting,
                  equals: "TASK_STATUS",
                  then: a!localVariables(
                    local!status: index(
                      local!taskStatuses,
                      local!fieldValue + 1,
                      {}
                    ),
                    a!richTextDisplayField(
                      value: {
                        a!richTextIcon(
                          icon: index(local!status, "icon", "circle"),
                          color: index(local!status, "color", "#666666")
                        ),
                        "  ",
                        index(local!status, "name", "Other")
                      }
                    )
                  ),
                  equals: "DATE_TIME",
                  then: if(
                    a!isNullOrEmpty(local!fieldValue),
                    local!fieldValue,
                    text(
                      local!fieldValue,
                      "MMM D, YYYY, H:MM am/pm"
                    )
                  ),
                  /* Show a process link for task details */
                  whenTrue: fv!item.configuredDrilldown = "TASK_DETAILS",
                  then: a!linkField(
                    links: a!processTaskLink(
                      label: local!fieldValue,
                      task: index(fv!row, fv!item.drilldownField, {})
                    ),
                    /* Format Assigned To field */
                    whenTrue: fv!item.field = "c8",
                    then: a!richTextDisplayField(
                      value: a!forEach(
                        items: fv!row.c8,
                        expression: if(
                          /* Check if User type (4), otherwise it's a Group (5) */
                          runtimetypeof(fv!item) = 4,
                          a!richTextItem(
                            text: user(fv!item, "firstName") & " " & user(fv!item, "lastName") & char(10),
                            link: a!userRecordLink(user: fv!item),
                            linkStyle: "STANDALONE"
                          ),
                          /* Adding char(10) adds line breaks to the list of names */
                          group(fv!item, "groupName") & char(10)
                        )
                      )
                    ),
                    
                  ),
                  default: local!fieldValue
                )
              ),
              align: if(
                fv!item.configuredFormatting = "DATE_TIME",
                "END",
                "START"
              )
            )
          ),
          borderStyle: "LIGHT",
          rowHeader: 1
        )
      }
    )
  }
)

  Discussion posts and replies are publicly visible