SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

Last post 04-22-2014 02:52 PM by Rommel Sta. Juana. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-20-2014 11:41 PM

    SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Hi,

    Good day.I would like to inquire if there is a way to retain the original attachment in the XML file after the SaveToSharePoint command is executed? Is there a way also to have a unique file name for each file that is save to the document library? Attach is the actual form that I have that is working fine except for the two requirements mentioned above. Thank you..

  • 04-21-2014 06:32 AM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Hi-

    Yes, you can do both of these things.

    To keep the original attachment, use the parameter /clear=no

    To name a file, you can use the parameters /name (non repeating) or /namexpath (repeating attachment).

    In your case you'll have to add form name to each row of the schema, so you could use

    SaveToSharePoint /url= /xpath=/my:myFields/my:group1/my:group2/my:File /clear=no /namexpath=my:name

    Hope this helps!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-21-2014 03:00 PM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Thank you very much Ernesto. I will try this and see how it works.
  • 04-21-2014 05:17 PM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Hi Ernesto,

    Good day. The form is almost working but I cannot get the correct /xpathname to be able to use in a repeating table.  The attached form works fine as long as there is only once attachment. But as soon as I add another attachment, the file will not be save in sharepoint. What I'm trying to achieve is to name each individual file with the value of the text in field3. Can you please help me once again. Thank you.

  • 04-21-2014 05:31 PM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Hi - you'll want to add the name field as an attribute to the File node and then use the relative path in the command. See attached. :)

    Hilary Stoupa

  • 04-21-2014 06:03 PM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    Thank you very much Hilary. Is it correct that I can set the default value of the "name" field of the "File" node to concatenate other field to automate the naming? (  for example concat(field4, "-", field1)   )
  • 04-22-2014 07:29 AM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

    You certainly can - You'll want to make sure those names are unique tho. :)

    Hilary Stoupa

  • 04-22-2014 02:52 PM In reply to

    Re: SaveToSharePoint not to delete original attachment in the XML File and create unique file name for each attachment

     Thank you very much Hilary and Ernesto. My inquiry is now resolved. Have a nice day.

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