Multiple attachment to be saved to a library and in case deleted, update the document library as well. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Multiple attachment to be saved to a library and in case deleted, update the document library as well.

Last post 02-10-2021 09:27 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-07-2021 06:52 PM

    Multiple attachment to be saved to a library and in case deleted, update the document library as well.

    Hi Team,

    Hope you can assist me with my repeating table, with a repeating table attachment control.

    • Goal is to be able to save each file to a document library;
    • and If I removed an attachment, it will remove the copy as well in the library

     

    Thank you in advance! 

  • 02-08-2021 07:53 AM In reply to

    Re: Multiple attachment to be saved to a library and in case deleted, update the document library as well.

    Are you using SharePoint on-prem or online? This can't be done without code or a third-party tool like qRules or FormsViewer.... I don't know if workflow tools like Nintex do this. It may be possible with Logic Apps (last I checked, I couldn't do anything with InfoPath base64 in Power Automate, because of the special header InfoPath adds, but I think it can be done with script in Logic Apps).
    Hilary Stoupa

  • 02-09-2021 08:39 PM In reply to

    Re: Multiple attachment to be saved to a library and in case deleted, update the document library as well.

    Hello,

    Thank you - we're using on prem and yes we have the qrule.  

    Command: concat("SaveToSharePoint /url=https://companysitelibrary /xpath=/my:myFields/my:group1/my:DL/my:group3/my:group4/my:Attachments /overwrite=yes /name=", qRuleFileNameTemp)

    Hope you can assist us with the qrule command. I can't attach a file. :(

    Is it correct we can't add the rule under the button AND should only be at the actual attachment control only?

     


  • 02-10-2021 09:27 AM In reply to

    Re: Multiple attachment to be saved to a library and in case deleted, update the document library as well.

    So - this command will submit multiple attachments if they exist (i.e. the Attachments field is repeating, or they are in a repeating group). What we generally do, design-wise, is have a hyperlink and a delete button in a section and the file attachment control in another, determining which to show based on whether the qRulesLink field is populated. I've attached a simple sample with this concept. I don't understand this question: "Is it correct we can't add the rule under the button AND should only be at the actual attachment control only?" You can save attachments as they are attached, on a button, as submit rules, etc. To delete a file, if you take the approach I've outlined - when the user clicks the "delete" button for a given file, you can use the DeleteFromSharePoint command to remove the file. If you want, you could then use a Delete command to remove the instance of the repeating group or field - up to you. Oh - and I'm not clear if you are getting an error or something from the command you are using, so more info on that would be helpful.
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.