2 answers
- 10-1
I've finally been able to get the result I was looking for. In order to solve the issue I looked at how the datalist link formatter is generating the link to the uploaded file.
Here a simple app with a two steps process:
- Upload form: it allows the user to upload a file. This form also store the current processId this action is necessary in order to have the necessary information to download later the file
- Download form: it allows the user to download the just uploaded file. The link is made as follow
/jw/web/client/app/{appId}/{appVersion}/form/download/{formId}/{processId}/{fileName}.- /jw/web/client/app/{appId}/{appVersion}/form/download/{formId} (has been hardcode)- {processId} (has been stored in the Process ID text box in the Upload form accessing the assignment.processId Hash variable)- {fileName} (has been stored in the Upload field of the Upload form
An important note: the upload form has not to be associated to the start green dot that initiates the process execution. In fact, at that time, the processId is not yet been assigned and the #assignment.processId# cannot be successfully referenced.
Add your comment... - 10-1
Below is a sample app:
APP_testFileUpload-1-20171109121232.jwa
To show the link of an uploaded file from the previous form, simply drag and drop a File Upload element in the next form, match the field ID of the file upload element in the previous form, and set it to read-only.
- Roberto Larcher
Thanks a lot, one important thing that is missing in your explanation is that the table used to store the information by the two forms has to be the same. I'm wondering if it is correct to store the information of multiple form in the same table, usually I choose a different table for each form. In my case I have to show this link in all the activities of the process, should I use the same table for all the forms? Isn't it possible to use a hash variable as I'm doing for all the other values?
Add your comment...
Hi,
I have a process made of two activities:
In order to show the link I'm using a readonly textbox and assigning to it as default value the following hash variable:
#form.form1.uploadFile1#
Unfortunately this hash variable is resolved as the name of the file and not the link to the file. How can I get the link?
Thanks