How can I filter this report with user name?

I am using below recipe to create a SAIL report. How can I filter this report with user name? Please note that I have added a column "Assign To" in the portal report that display's tp!owner information. I was able to add the user picker to the below recipe, but I am unable to filter the grid based on user that is being selected by the user picker control object.

forum.appian.com/.../SAIL_Recipes.html
Thank you for your help in advance!

OriginalPostID-147970

OriginalPostID-147970

  Discussion posts and replies are publicly visible

  • @zulfiqarp No worries :). Yep, so as per my previous explanation, it entirely depends on the number of columns that already exist in the Appian. The answer in short could be 'c' appended by . For ex., c5.

    Also please make a note that if you have already performed some additions or removals of columns, Appian won't reuse the ids. Let's say you have 5 columns in the report initially. Let's assume that thereafter you have added and removed 5 columns. Now if you add a new column, the field will be identified as 'c10' instead of 'c5'.

    Please do let me know if you have any follow up questions.
  • Is there any way to know what columns (c1,c2,c3...) are assigned/map to your portal report columns?
  • For example, I have executed the a!queryProcessAnalytics in our server:

    Example:
    local!queryresult:a!queryProcessAnalytics(
                        report: <my_report>,
                        contextGroups: {},
                        contextProcessIds: {},
                        contextProcessModels: {<process_model_id>},
                        contextUsers: {},
                        query: a!query(
                                  logicalExpression: null,
                                  pagingInfo: a!pagingInfo(
                                            startIndex: 1,
                                            batchSize: -1
                                  )
                        )
    )

    Below is the datasubset obtained from a!queryProcessAnalytics as follows:
    [startIndex=1, batchSize=1, sort=[field=c6, ascending=true], totalCount=38, data=[c6:101091,c5:4,c4:,c9:,c8:1,c7:5183,c0:Test quick task - ABC,c11:,c10:268472456,c13:Test quick task,c12:,dp10:,dp13:,dp0:268472456,dp4:,dp5:,dp6:,dp7:,dp8:,dp9:,dp11:,dp12:], identifiers=268472456, name=Tasks by process model, description=Tasks by process model for updating task summary in database in order to persist process summary gird in dashboard., columnConfigs=[label:Id,field:c10,drilldownField:dp10,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Name,field:c13,drilldownField:dp13,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Display,field:c0,drilldownField:dp0,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Owner,field:c4,drilldownField:dp4,configuredFormatting:USER_NAME,configuredDrilldown:]; [label:Status,field:c5,drilldownField:dp5,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Assignment id,field:c6,drilldownField:dp6,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Process model id,field:c7,drilldownField:dp7,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Priority,field:c8,drilldownField:dp8,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Completed,field:c9,drilldownField:dp9,configuredFormatting:DATE_TIME,configuredDrilldown:]; [label:Year,field:c11,drilldownField:dp11,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Month,field:c12,drilldownField:dp12,configuredFormatting:NUMBER,configuredDrilldown:], errorMessage=]

    Let's observe the columnConfigs below:
    columnConfigs=[label:Id,field:c10,drilldownField:dp10,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Name,field:c13,drilldownField:dp13,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Display,field:c0,drilldownField:dp0,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Owner,field:c4,drilldownField:dp4,configuredFormatting:USER_NAME,configuredDrilldown:]; [label:Status,field:c5,drilldownField:dp5,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Assignment id,field:c6,drilldownField:dp6,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Process model id,field:c7,drilldownField:dp7,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Priority,field:c8,drilldownField:dp8,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Completed,field:c9,drilldownField:dp9,configuredFormatting:DATE_TIME,configuredDrilldown:]; [label:Year,field:c11,drilldownField:dp11,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Month,field:c12,drilldownField:dp12,configuredFormatting:NUMBER,configuredDrilldown:]

    Let's observe one of the value from the above array:
    [label:Id,field:c10,drilldownField:dp10,configuredFormatting:NUMBER,configuredDrilldown:]

    The value of label, 'Id' is the name of the column in report.
    The value of field, 'c10' is the field associated with 'Id' column which we need to use while using a query filter (a!queryFilter(label:"c10",operator:"=",value:10)) or used when accessing data (index(local!queryresult.data,"c10",null)).
  • Thanks! How were you able to print out datasubset obtained from queryProcessAnalytics ? If I can get that output, I can extract the field name from it as you suggested.
  • @zulfiqarp No problem, Its quiet simple.

    local!queryresult:a!queryProcessAnalytics(
    \ treport: ,
    /*Create a document of type constant and include the report in the constant. Else you can hardcode as well, for ex. todocument(100)*/
    \ tcontextGroups: {},
    \ tcontextProcessIds: {},
    \ tcontextProcessModels: {},
    \ tcontextUsers: {},
    /*Depending on type of the report, provide the context. Supoose if you want tasks per process model, provide a process model to 'contextProcessModels'. Ex: contextProcessModels:{1381} where 1381 is the process model id.*/
    \ tquery: a!query(
    \ tlogicalExpression: null,
    \ tpagingInfo: a!pagingInfo(
    \ tstartIndex: 1,
    \ tbatchSize: 1
    \ t)
    \ t)
    )

    Or else if you could let me know your requirement, I could help you out.
  • My question to you earlier is how do you print out the result of the datasubset? I have already setup queryProcessAnalytics and it is working. How can I print the result of queryPorcessAnalytics columnConfigs as you provided below?

    columnConfigs=[label:Id,field:c10,drilldownField:dp10,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Name,field:c13,drilldownField:dp13,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Display,field:c0,drilldownField:dp0,configuredFormatting:NORMAL_TEXT,configuredDrilldown:]; [label:Owner,field:c4,drilldownField:dp4,configuredFormatting:USER_NAME,configuredDrilldown:]; [label:Status,field:c5,drilldownField:dp5,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Assignment id,field:c6,drilldownField:dp6,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Process model id,field:c7,drilldownField:dp7,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Priority,field:c8,drilldownField:dp8,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Completed,field:c9,drilldownField:dp9,configuredFormatting:DATE_TIME,configuredDrilldown:]; [label:Year,field:c11,drilldownField:dp11,configuredFormatting:NUMBER,configuredDrilldown:]; [label:Month,field:c12,drilldownField:dp12,configuredFormatting:NUMBER,configuredDrilldown:]

  • @zulfiqarp In that case it's much simple. I hope the below code results in what you want.

    load(
    \tlocal!querieddata:a!queryProcessAnalytics(),
    \t
    \t/*This statement prints the columnConfigs value*/
    index(local!querieddata,"columnConfigs",{})
    )
  • Sorry to bug you again... my code does not generate any errors but it does not print any datasubset See my code below
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 1
    ),
              local!querieddata:a!queryProcessAnalytics(report:cons!TEST_REPORT,
    contextProcessModels: {cons!TEST_PROCESS_MODEL},
    query: a!query(logicalExpression: null,
    pagingInfo: local!pagingInfo)),

              /*This statement prints the columnConfigs value*/
    index(local!querieddata,"columnConfigs",{})
    )