Is it possible to create an editable grid which I can use to upload more documen

Is it possible to create an editable grid which I can use to upload more documents and simultaneously download a document? Similar to the one in the Capture.JPG uploaded. But the way to download the already uploaded documents.

OriginalPostID-204933

OriginalPostID-204933

  Discussion posts and replies are publicly visible

Parents
  • Hi Ashmita

    As I mentioned above, AFAIK it is not possible to show the document download link for a document unless the form is submitted once because till then the document is saved with a temporary id on the server. You can only show a working document download link for a document once the form on which it has been uploaded has been submitted at-least once.

    Now one working solution could be that you show two different columns in your 'Document' editable grid, one to upload the document and the next to show the document download link for the same document. Show the link in the next column only if you are having valid Document if which you can determine with the help of some logic to derive only those doc ids for which the form have been submitted at least once. So you can do this this way that once you upload a document in one of the rows in grid and submit the form, you will be sending the document through a document type ri! in process. After the user input task activity has been executed, the pv! in the process now holds the legit doc id which you can send back to form while looping back the workflow in the form for some more doc uploads. This time on the grid in the next column you can show the document download link for these legit doc ids next to the respective document upload form. Now this will also tell the user which document has been uploaded and which not.
    You will need to do some additional checks as well
    - Show a blank text box conditionally in the a!gridRowLayout() of grid instead of documnetdownload link(probably with text 'N/A') when no valid doc id is present against a row, in the document link column.
    - As in editable grid user should also be able to delete a document that has been accidentally uploaded in the system, so note the do_ids of such ones and then use delete document smart service in the process model to delete them from the system, upon final submission of the form.
Reply
  • Hi Ashmita

    As I mentioned above, AFAIK it is not possible to show the document download link for a document unless the form is submitted once because till then the document is saved with a temporary id on the server. You can only show a working document download link for a document once the form on which it has been uploaded has been submitted at-least once.

    Now one working solution could be that you show two different columns in your 'Document' editable grid, one to upload the document and the next to show the document download link for the same document. Show the link in the next column only if you are having valid Document if which you can determine with the help of some logic to derive only those doc ids for which the form have been submitted at least once. So you can do this this way that once you upload a document in one of the rows in grid and submit the form, you will be sending the document through a document type ri! in process. After the user input task activity has been executed, the pv! in the process now holds the legit doc id which you can send back to form while looping back the workflow in the form for some more doc uploads. This time on the grid in the next column you can show the document download link for these legit doc ids next to the respective document upload form. Now this will also tell the user which document has been uploaded and which not.
    You will need to do some additional checks as well
    - Show a blank text box conditionally in the a!gridRowLayout() of grid instead of documnetdownload link(probably with text 'N/A') when no valid doc id is present against a row, in the document link column.
    - As in editable grid user should also be able to delete a document that has been accidentally uploaded in the system, so note the do_ids of such ones and then use delete document smart service in the process model to delete them from the system, upon final submission of the form.
Children
No Data