Get Document Download link from Task Report to SAIL Grid

Hello All,

I am new to APPIAN and this is a complex requirement from my perspective. 

We have a SAIL form, which has a Grid with product details. Clicking on the Export button will start a process with startprocesswrite activity to export the excel. When the user chooses to export rather than email this export, A User task will be created that is accessible in Tempo and clicking on the link inside this task downloads the report. All this functionality is working fine.

But, we have made an enhancement which will show the tasks list of all such export tasks in the SAIL form (using a!processTaskLink(task: fv!item) and drilling down on TASK_DETAILS). My expectation is that clicking on this Task Item should download the excel file rather than taking me to the Task page which is happening currently.

I have successfully tried doing this by hard coding a document id (same for all the tasks) in the report like below. But I want to know how to attach the document id which is inside the task details in the SAIL form. 

links:if(
       fv!item.configuredDrilldown = "TASK_DETAILS",
       a!forEach(
        items: index(local!report.data, fv!item.drilldownField, {}),
        /*expression: a!processTaskLink(task: fv!item)*/
        expression: a!documentDownloadLink(todocument(232099))
       ),
       null
      )

I would like something like this to work.

links:if(
       fv!item.configuredDrilldown = "TASK_DETAILS",
       a!forEach(
        items: index(local!report.data, fv!item.drilldownField, {}),
        /*expression: a!processTaskLink(task: fv!item)*/
        expression: a!documentDownloadLink(
            getactivetaskidsforprocess(task: fv!item) and get the document id from the task details
       ),
       null
      )

 

Thanks,

Hema

 

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data