Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

How does contextProcessModels property of a!queryProcessAnalytics() function wor

How does contextProcessModels property of a!queryProcessAnalytics() function work?

My a!queryProcessAnalytics() function works great below when using contextProcessModels, but when I try and switch to contextProcessIds to display just the current process, it returns nothing. So then I backed up and just tried to hard-code the process ID that I want which is 6400, and that doesn't work. I tried using the processId variable and toInteger(6400) but no luck. What gives?

How is the contextProcessIds used correctly to return just those process IDs (pp!id) and can you show an example?

Thanks much!

local!report: a!queryProcessAnalytics(
report:cons!eOff_TASKS_GRID,
/* contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL, */
           contextProcessIds:{tointeger(6400)}
          
           /*
contextProcessIds:
           contextProcessModels:cons!eOFF_MAIN_PROCESS_MODEL
           contextProcessIds:6400,
           ri!processId,*/
          
/*


OriginalPostID-201423

OriginalPostID-201423

  Discussion posts and replies are publicly visible

Parents
  • At a high level what I could suggest as of now is as follows:

    1. Print the datasubset initially as follows without any filters:

    a!queryProcessAnalytics(
    report: cons!eOff_TASKS_GRID,
    contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL,
    query: a!query(
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: -1)
    )
    ).columnConfigs

    Then you may see similar to below:
    {
    {
    label: "Task",
    field: "c0",
    drilldownField: "dp0",
    configuredFormatting: "NORMAL_TEXT",
    configuredDrilldown: "PROCESS_DASHBOARD"
    },
    {
    label: "Process ID",
    field: "c7",
    drilldownField: "dp7",
    configuredFormatting: "NUMBER",
    configuredDrilldown: ""
    }
    }


    2. Identify the desired column name (Process ID in your case) in the 'label' and pick the associated 'field'. This is what I have said by quoting it as cx.

    3. Post identifying the 'field' attribute, build the queryFilter.

    a!queryProcessAnalytics(
    report: cons!eOff_TASKS_GRID,
    contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL,
    query: a!query(
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: -1),
    filter: a!queryFilter(field: "c7", operator: "in", value: tointeger(ri!processId))
    )
    )

    Further I would like to suggest you going through forum.appian.com/.../Task_Report_Tutorial.html and forum.appian.com/.../System_Functions.html to gain insights over the functionality of a!queryProcessAnalytics().
Reply
  • At a high level what I could suggest as of now is as follows:

    1. Print the datasubset initially as follows without any filters:

    a!queryProcessAnalytics(
    report: cons!eOff_TASKS_GRID,
    contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL,
    query: a!query(
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: -1)
    )
    ).columnConfigs

    Then you may see similar to below:
    {
    {
    label: "Task",
    field: "c0",
    drilldownField: "dp0",
    configuredFormatting: "NORMAL_TEXT",
    configuredDrilldown: "PROCESS_DASHBOARD"
    },
    {
    label: "Process ID",
    field: "c7",
    drilldownField: "dp7",
    configuredFormatting: "NUMBER",
    configuredDrilldown: ""
    }
    }


    2. Identify the desired column name (Process ID in your case) in the 'label' and pick the associated 'field'. This is what I have said by quoting it as cx.

    3. Post identifying the 'field' attribute, build the queryFilter.

    a!queryProcessAnalytics(
    report: cons!eOff_TASKS_GRID,
    contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL,
    query: a!query(
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: -1),
    filter: a!queryFilter(field: "c7", operator: "in", value: tointeger(ri!processId))
    )
    )

    Further I would like to suggest you going through forum.appian.com/.../Task_Report_Tutorial.html and forum.appian.com/.../System_Functions.html to gain insights over the functionality of a!queryProcessAnalytics().
Children
No Data