I am trying to create a task report and I have taken reference from:

Hi

I am trying to create a task report and I have taken reference from:
forum.appian.com/.../Task_Report_Tutorial.html

In my task report I have a column Assigned To. The values in this column are either Group or User which are being displayed but group is being displayed as Goup: id and user as username, PFA screenshot for your reference.
Can some one please suggest how do I display user's as well as group's name?

Thanks in advance....

OriginalPostID-199642



  Discussion posts and replies are publicly visible

  • @komalc I would suggest writing a rule which formats the data in the grid. I believe the SAIL recipe has a good and similar example at https://forum.appian.com/suite/help/7.8/SAIL_Recipes.html#Display_Processes_by_Process_Model_with_Status_Icons.

    Instead of configuring the indicator in the Portal Report, just configure the average lag time and fetch the same while querying analytics.

    And write a rule thereafter which gets a indicator based on the average lag time and it might look like below:

    if(
    \t,
    \ta!documentImage(document: a!iconIndicator(icon: "MOVE_UP"), altText: "High"),
    \ta!documentImage(document: a!iconIndicator(icon: "MOVE_UP"), altText: "Low"),
    )

    Finally apply the rule iteratively over the column data in the grid as follows:
    a!gridImageColumn(
    label:
  • Hi @sikhivahans

    Thank you for replying!!
    I tried with the help of SAIL recipe and your code snippet above. However, I am still not able to display the required data.
    I am trying to fetch the image for my column average Lag time. By default it is of type Normal Text, I have used the formatting Duration for it so that it helps me when I am calling the rule for the image.

    Below is the code where I am calling my sub rule:



    with(
    local!columnData: index(ri!data, ri!columnConfig.field, {}),
    local!columnDataCount: count(local!columnData),
    if(
    ri!columnConfig.configuredFormatting = "Duration",
               a!gridImageColumn(
    label: ri!columnConfig.label,
    field: ri!columnConfig.field,
    size: "ICON",
    data: apply(
    rule!AT_dispalyIndicatorImage(data: local!columnData, index: _),
    1 + enumerate(local!columnDataCount)
    )
    ),
    a!gridTextColumn(
    label: ri!columnConfig.label,
    field: ri!columnConfig.field,
    data: if(
    local!columnDataCount > 0,
    apply(
    if(
    ri!columnConfig.configuredFormatting = "TASK_STATUS",
    rule!AT_getTaskStatusDisplay(data: local!columnData, index: _),
    if(ri!columnConfig.configuredFormatting = "USER_OR_GROUP_NAME",
    rule!AT_displayUserName(data: local!columnData, index: _),
    rule!AT_displayTextCell(data: local!columnData, index: _)
    )
    ),
    1 + enumerate(local!columnDataCount)
    ),
    {}
    ),

    links: if(
    ri!columnConfig.configuredDrilldown = "TASK_DETAILS",
    apply(
    a!processTaskLink(task: _),
    index(ri!data, ri!columnConfig.drilldownField, {})
    ),
    null
    )

    )
    )
    )




    My sub rule where I am calling a!documentImage to display the image is:

    if(
              (ri!data[ri!index]>20),
              a!documentImage(document: a!iconIndicator(icon: "MOVE_UP"), altText: "High"),
              a!documentImage(document: a!iconIndicator(icon: "MOVE_UP"), altText: "Low")
    )


    Here data is Any Type and index of Number(Integer).

    However, the image is still not displayed.
  • @komalc Hi, may I know what 20 means here? Is it days/hours/minutes/seconds? It would be grateful if you can provide me input on it.
  • Hi @sikhivahans

    Thank you for replying.
    Just as Appian provides indicator value in Indicators tab (with the help of which I was able to display indicator on my Portal Report), the same way I picked an indicator >20.

    Thanks in advance...
  • Hi @sikhivahans

    As written in the previous comment, my columnConfig.configuredFormatting for this column is Duration, so the way data is reflected is a combination of daya,hours,minutes and seconds. If I put a performance indicator on my portal report then I see that it discriminates on basis of days i.e. green for rows where Average Lag Time in terms of days is below 20 , yellow for rows where Average Lag Time in terms of days is between 20 and 50, redfor rows where Average Lag Time in terms of days is above 50.

    Thanks in advance.
    Regards
    Komal Chauhan
  • @komalc So, you do want it in days, am I correct? The reason why I have asked you is, when I quickly executed your usecase in our environment I got the values in terms of duration and we need to take out the days/hours/minutes/seconds out of it on need basis.

    Let me get back to you in next couple of hours.
  • Hi @sikhivahans

    Thanx for replying, I want to display an indicator in my portal report in the same way it is being displayed in my portal report (as described in the comment above). I feel that since the indicator in portal report is being displayed with the duration data itself so I guess in SAIL also it should be the same rather than fetching days or minutes etc from the duration data.

    Thanks for replying, please take your time.

  • @komalc Hi, I have attached a simple example which will let you know how to get the 'days' information from the Duration and get an icon accordingly. I hope this should help letting you know re how to build a similar functionality in your case.

    Please do let me know if you have any follow-up questions.

    You assume that the indicator in portal report is being displayed with the duration data itself so it should be the same rather than fetching days or minutes etc from the duration data. I don't believe this is possible because Appian does it by default for you whenever you are making use of Portal Report, whereas in Tempo we need to do it by ourselves and also creating a rule which reads the data and derives an icon accordingly makes the change management easier.
  • Hi @sikhivahans

    Thanks for replying!!
    I understood your point that in Tempo reports we need to do differentiate manually between days or minutes.
    Thanks for your help, I got the desired result in my Tempo Report.
  • @komalc No worries, glad to hear that your issue is resolved :). Keep us posted incase if you have any questions again.