Retriving specific data from a!queryprocessanalytics

Hi All,

any help would be appreciated regarding the solution for situation below:

Situation: I have a task report that identifies the current owner of an acive task in a specific instance of a process. I also have a process-backed record that displays the current owner of the task for a specific case (instance) of process. I need to populate that task owner information in the record while the task is active. 

Initially in tried to populate task owners in a process variable, but the value in those process variable is only updated once the task is finished.

Now I understand that a!queryprocessanalytics needs to be used to query the task report and get the current task owner information of an active task. The output for now returns a lot of data. The format can be seen in the link. I am also attaching the (PortalReportDataSubset) response that i recieve at the end of this message and highlight what information i actually require.

What would be the correct syntax of the expression to get the task owner name/username from the list of output.

[startIndex=1, batchSize=25, sort=[field=c0, ascending=true], totalCount=1,

data=[c3:1/15/2019 1:12 PM EST,c4:ABCD,c0:X Response,c1:1,c2:XYZ, dp0:268446889,dp1:,dp2:,dp3:,dp4:ABCD],

identifiers=268446889, name=XYZ_UserTasks, description=, columnConfigs=

[label:Name,field:c0,drilldownField:dp0,configuredFormatting:NORMAL_TEXT,configuredDrilldown:TASK_DETAILS];

[label:Status,field:c1,drilldownField:dp1,configuredFormatting:TASK_STATUS,configuredDrilldown:];

[label:Process,field:c2,drilldownField:dp2,configuredFormatting:NORMAL_TEXT,configuredDrilldown:];

[label:Start Time,field:c3,drilldownField:dp3,configuredFormatting:DATE_TIME,configuredDrilldown:];

[label:Task Owner,field:c4,drilldownField:dp4,configuredFormatting:NORMAL_TEXT,configuredDrilldown:TASK_DETAILS],

errorMessage=]

Thanks in advance for your help.

Paras C.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    If you query into a local variable i.e. local!queryResult, I expect you can get the list of usernames by referring to the returned data dictionary properties, i.e. local!queryResult.data.c4 (which will be a list if more than one exist)
  • Hi Mike,

    This is the expression i have used so far, i dont recieve the required result:

    a!queryProcessAnalytics(
    report: cons!XXXReport,
    query: a!query(
    logicalExpression: a!queryFilter(local!queryResult.data.c4),
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 25)
    )
    )

    Result:
    Expression evaluation error at function a!applyComponents [line 95]: A grid layout column [label=“Task Owner”] has an invalid value for “component”. The component in row 1 encountered the following error: Expression evaluation error at function a!queryFilter [line 50]: Could not find variable 'local!queryResult'

  • 0
    Certified Lead Developer
    in reply to parasc0001

    I'm pretty confused where this line of code comes from:

    logicalExpression: a!queryFilter(local!queryResult.data.c4),

    Have you defined local!queryResult somewhere prior to this?  Because this doesn't resemble any proper usage of a local variable that I know of.  In my comment earlier, I was suggesting that you store the original query result (the query info you have copied into the original post) into the local variable, then address the specific data by calling local!queryResult.data.c4.

Reply
  • 0
    Certified Lead Developer
    in reply to parasc0001

    I'm pretty confused where this line of code comes from:

    logicalExpression: a!queryFilter(local!queryResult.data.c4),

    Have you defined local!queryResult somewhere prior to this?  Because this doesn't resemble any proper usage of a local variable that I know of.  In my comment earlier, I was suggesting that you store the original query result (the query info you have copied into the original post) into the local variable, then address the specific data by calling local!queryResult.data.c4.

Children
No Data