Filter on Process report using Expression Rule

Hi, 

I have a process report of various columns, which includes column c10 which contains the username of the user to whom the task is assigned.

Now I am fetching that report using Expression Rule :

a!queryProcessAnalytics(
report: cons!MPPCONS_Report,
contextProcessModels: {
cons!MPPCONSPM_Task
},
query: a!query(

pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1,

),

)
).data

Now I want to filter this report to only return data related to logged-in user only, for example, only those records should be returned which have c10 columns data as logged in user username.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • , have you tried including a query filter in your report? I'm not sure what c10 is returning feel free to use the code below and tweak it if needed

    a!queryProcessAnalytics(
      report: cons!MPPCONS_Report,
      contextProcessModels: { cons!MPPCONSPM_Task },
      query: a!query(
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1, ),
        filter: a!queryFilter(
          field:"c10",
          operator: "=",
          value: loggedInUser()
        )
      )
    ).data

Reply
  • , have you tried including a query filter in your report? I'm not sure what c10 is returning feel free to use the code below and tweak it if needed

    a!queryProcessAnalytics(
      report: cons!MPPCONS_Report,
      contextProcessModels: { cons!MPPCONSPM_Task },
      query: a!query(
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1, ),
        filter: a!queryFilter(
          field:"c10",
          operator: "=",
          value: loggedInUser()
        )
      )
    ).data

Children