1
0
-1

Hi,

I have a process made of two activities:

  • The first activity is mapped to a form that allows to upload a file (let's call the table where the form data are stored form1 and the field used to upload the file uploadFile1)
  • The second activity is mapped to a second form. In this form I would like to show a link to the file uploaded in the previous form.

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

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -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:

      1. 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
      2. 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.

        CommentAdd your comment...
      1.  
        1
        0
        -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.

        1. 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?

        CommentAdd your comment...