download excel report from temporary community document folder to local drive

Hi ,

We have created a process model which will extract the report from querydatabase and export it to excel and save it under temporary document folder in community section.

We need to add this to report tab in tempo page as XYZ Report. Users needs to click on XYZ Report and the excel generated report could be downloadable and save this to local drive.

Could anyone help us and let us know how to do it.

Attached the process model.


OriginalPostID-255357



  Discussion posts and replies are publicly visible

  • @Sudhir,

    You can create a tempo report by placing a linkfield using getdatasubsetdownloadlinkfromrule(On-premise) getdatasubsetdownloadlinkfromprocess(Cloud). this will give you a link which can be download as excel.

    Refer this link: https://forum.appian.com/suite/help/16.3/Download_DataSubset_Plugin.html
  • @sudhirp I have mentioned few approaches at https://forum.appian.com/suite/tempo/entry/e-254197 in my initial comments. I would like to suggest choosing an approach based on the amount of data you are trying to pull rather than just sticking with Download datasubset implementation. You may also take a look at web-api in the case if you would like to opt for downloadable link style implementation as it keeps things simple IMO when compared to Downloadable data subset plugin.

    Also, I would like to add that the model you have had can be reused depending on the approach you have opted for. For instance, this process model can't be reused if the approach you have opted for is Dowloadable data subset plugin.

    Let us know in case if you have any follow up questions.
  • 0
    Certified Lead Developer
    Download data to excel from report using Export to excel , There are different-different function in Cloud and On-Premise environment.

    1. If environment is Cloud then use this function getdatasubsetdownloadlinkfromprocess().

    2. If environment is On-premise then use this function getdatasubsetdownloadlinkfromrule().

    Please refer this link :- forum.appian.com/.../Download_DataSubset_Plugin.html

    Note:- When we use expression plugin getdatasubsetdownloadlinkfromprocess(processModelUuid,input) to add export link in SAIL interface,if the dynamic value that we pass as a parameter to the expression plugin character length is more than 1417 then link will not be generated, So while passing text data to input attribute we should pass limited data.
  • Hi,

    I have tried the below code.

    getdatasubsetdownloadlinkfromprocess((processModelUuid: cons!RPT_PROCESS_MODEL_UUID),
    "Download")

    But getting the below error

    Could not display interface. Please check definition and inputs.

    Interface Definition: Expression evaluation error at function 'getdatasubsetdownloadlinkfromprocess': Error evaluating function 'getdatasubsetdownloadlinkfromprocess' : null

  • Hi All,

    Right now I used the below code in the interface to pull the data from the link.
    -----------------------
    with(
    local!exportUri: getdatasubsetdownloadlinkfromprocess(processModelUuid: cons!RPT_PROCESS_MODEL_UUID),
    if(isNull(local!exportUri),
    {/* Show an alternate message if the link cannot be generated */},

    a!linkField(
    links: {
    a!safeLink(

    label: "Download Daily Report",
    uri: local!exportUri
    )
    }
    )
    )
    )
    -----------------------

    When I click on the link. I am getting the "500 Internal Server error"

    Attached then error logs.

    Error-Log.txt

  • Any update on this would be helpful. I am getting 500 Internal Server error when click on the link.

    Attached error log.
  • @SudhirP, Initially i too get this issue. Then i update my logic which i missed the order of fieldNames and fieldLabels.

    Make sure your process variable name is exportData and type is ExportableDataSubset.
    If possible can you share your process model configuration.
  • Please find here the detail . Process model that export SQL to Excel. and The Interface design


  • Here no need of export to excel smart service. its enough to Populate the 'exportData' variable with your data in script task. this variable data will be picked to export in excel. check the below configuration for exportData:

    fieldNames:{"firstName","lastName","dateOfBirth","gender"},/* these values are CDT properties from which cdt type you export*/
    fieldLabels:{"First Name","Last Name","DOB","Gender"}/*These values will be headers in your exported excel*/
    datasubset:rule!TEST_getMyOrders({pv!OrderIds},topaginginfo(1,-1))/* this is query rule, i passed paginginfo to get in datasubset format*/
    filename:"Exported data"

    Whenever you clicked on download link that will trigger the process model. Can you monitor process instances is that exportData is populated or not
  • Could you please verify whether you are following the below guidelines inside the process model
    QUOTE//The model must have a process parameter named input of type Text and must populate a process variable named exportData of type ExportableDataSubset//UNQUOTE