Copy file(s) from one file upload control to another

Comments

8 comments

  • Avatar
    Aravind Rajanna

    Hello Patrick,

    Yes, you can get uploaded file object using eFormHelper.
    Please refer the below documentation links.
    To get uploaded files
    https://documentation.agilepoint.com/00/appbuilder/cloudjsGetUploadedFiles.html

    Copy to another fileupload control using eFormhelper.
    https://documentation.agilepoint.com/00/appbuilder/cloudjsAddFilesToFileControl.html

    Regards,
    Aravind Rajanna

    2
    Comment actions Permalink
  • Avatar
    Patrick Franklin

    Now that I have the files added into another upload control, is there a way to remove them from the original upload control? Is there a RemoveFilesFromFileControl?

    0
    Comment actions Permalink
  • Avatar
    Aravind Rajanna

    Hello Patrick,

    You can achieve it through JavaScript. Please try the below script, hope it might help.

    Syntax:

    $('[controlholdername="ControlInternalID "] .dz-preview').remove();

    Example:

    $('[controlholdername="FileUpload1 "] .dz-preview').remove();

    Note: Running this script will remove it from the control level. Files will be in the Target Location.

     

    Regards,

    Aravind Rajanna

    1
    Comment actions Permalink
  • Avatar
    braj sharma

    Hi Aravind,

    This will remove the content from UI however still it gets attached to task if user submits the form. Any alternate to remove the files on form load and keep files in Target Location. Once user submits the form, Files should not get attached to task.

    Regards,

    Braj

     

    0
    Comment actions Permalink
  • Avatar
    Aravind Rajanna

    Hello Braj,
    If attachments are not required for the next task, Please go to the control properties Advance Tab,
    Select the option "Do Not Persist" from the dropdown Data Security Settings. When this option is selected data will not be present in the BackEnd(AgilePoint Process Data).
    Please find the below screen capture.
     
    Hope this help 

    Regards,
    Aravind Rajanna

    1
    Comment actions Permalink
  • Avatar
    braj sharma

    Thanks Aravind. I know this option. 

    Actually my scenario is when User wants to Clone the Process at that time at least, user should be able to clear the File Upload control without impacting the Old completed process. Have you tried AgilePoint's Clone feature? 

    0
    Comment actions Permalink
  • Avatar
    Harish Lakshmana

    Braj, Clone feature is a request to reload entire data of an instance into new fresh eForm. It does not have selective form fields to be considered/ignored.

    0
    Comment actions Permalink
  • Avatar
    braj sharma

    I agree Harish. However there is no sense of referring same attachments for all the processes if Cloned the form to reuse form data only. Also if we want to remove it from Cloned form manually then it will remove attachments from original Process as well. There is no way to get rid off Old attachments like we can modify the form data but can't remove attachments. 

    0
    Comment actions Permalink

Please sign in to leave a comment.