Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
23 replies
Subscribers
9 subscribers
Views
11529 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
download excel report from temporary community document folder to local drive
sudhirp712
over 8 years ago
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
0
georgej
over 8 years ago
please don't change the variable names "input" and "exportData"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp712
over 8 years ago
Hi,
I have followed the above steps provided by venu but still getting the same issue. Please note the screenshot form the same. Please let me know if I am missing anything out here.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Venu
over 8 years ago
In your screen, I can see input variable is not a parameter. Make this input variable as parameter then give a try.
getdatasubsetdownloadlinkfromprocess(processModelUuid, input)
Here processModelUuid is process model type constant
getdatasubsetdownloadlinkfromprocess(cons!MY_PROCESS_MODEL, ri!input)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp712
over 8 years ago
Hi Venu,
I tried with the below but still getting the same error
with(
local!exportUri: getdatasubsetdownloadlinkfromprocess(processModelUuid: cons!RPT_PROCESS_MODEL_UUID),(ri!input),
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
)
}
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Venu
over 8 years ago
with(
local!exportUri: getdatasubsetdownloadlinkfromprocess(cons!RPT_PROCESS_MODEL_UUID,ri!input),
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
)
}
)
)
)
-> RPT_PROCESS_MODEL_UUID this constant should be process model type.
Try the above code once. And check if there is any instance created after clicking on the link. If created monitor the process variables.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp712
over 8 years ago
I tried the above code but it still throws error. But the process model run without any error. But the exportData process variable value is returning "No Value". Could you please suggest and let me know where I need to change.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 8 years ago
Can you not use a simple DocumentDownloadLink and point it to the PV of the Document that was generated by the process? If you want to get the LATEST version of the process variable, you should be able to run a simple queryProcessAnalytics() call on that process model, order by START DATE descending and take the output of the FIRST entry.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
georgej
over 8 years ago
Hi Sudhir, one observation why you are not saving your ac!exportData to pv!exportData. Put the pv!exportData in saveInto of ac!exportData
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp712
over 8 years ago
Hi George/Venu/Sathya,
I have tried the below change datasubset - saveinto (exportData.datasubset) it shows us download popup to save the file but not in correct format(note the screenshot attached) and when we trying to save as - "The File could not be downloaded".
When we monitor the process it run successfully without any error and also saved exportData variable(Note the screenshot)
Please suggest if you have any idea why export of the file is not coming in correct format and not to save the file.?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
georgej
over 8 years ago
I think Sudhir you are not saving correctly ,you need to save the 'entire ac!exportdata to pv!exportdata. For the ac!exportdata, you need to set values as below
exportData.datasubset equal to rule!getAllProducts(topaginginfo(startIndex: 1, batchSize: -1))
exportData.fieldNames equal to {"id", "name"}
exportData.fieldLabels equal to {"ID", "Name"}
exportData.filename equal to "Products"
Then save the entire ac!exportdata to pv!exportdata
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<
>