qRules SaveToSharePoint Help (file name) - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qRules SaveToSharePoint Help (file name)

Last post 11-14-2019 03:53 PM by sharepointing.and.lost. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-19-2013 07:55 AM

    qRules SaveToSharePoint Help (file name)

    I've installed a trial version of qRules and have the SaveToSharePoint command working. When the file is saved to the SharePoint library, it prepends the date, time and an underscore to the file name. I do not want this; I want just the file name as it is attached. Is there a way of achieving this? Thanks
  • 11-19-2013 08:11 AM In reply to

    Re: qRules SaveToSharePoint Help (file name)

    Yes, there is a way to do this.

    1. In a rule before your SaveToSharePoint rule, execute the GetAttachmentAttribute command with /attr=name. This will return the name of the attachment to the Qdabra Rules result node.
    2. In your SaveToSharePoint rule, you'll need to use a formula instead of just setting the value to a string in your rule to set the Command field - formula will look something like this:
      concat("SaveToSharePoint /url=http://server/site/docLibrary /xpath=/my:myFields/my:Images/my:Image /name=", Result)

    So, basically, you use qRules to get the name of the attachment, then you add the "name" param to your SaveToSharePoint command. You may also want to add the /overwrite param to your SaveToSharePoint command so that you can control what happens if there are multiple attachments saved to the same library that have the same name (which is why we add the date and time info to files by default).

    Hilary Stoupa

  • 05-13-2016 06:43 AM In reply to

    Re: qRules SaveToSharePoint Help (file name)

    Hi Hilary,

    How can I add overwrite parameter in below formula?

    concat("SaveToSharePoint /url=http://server/site/docLibrary /xpath=/my:myFields/my:Images/my:Image /name=", Result)

    Thanks In Advance
    Praveen Manne
  • 10-31-2019 05:22 PM In reply to

    Re: qRules SaveToSharePoint Help (file name)

    Hi Hilary!

    I tried adding a concat function in the QRulesFilename part but it doesn't generate the filename.

    My formula is: concat("SaveToSharePoint /url=http://server/site/docLibrary /xpath=/my:Form/my:group36/my:group37/my:group38/my:AttachSection /name=", concat(SystemGeneratedCode,"_",@qRulesNewFileName))

    Checking the document library, it returns "SystemGeneratedCode_". Even if I upload multiple items, it just returns one "SystemGeneratedCode_" file.

    I'm using this on a repeating table and can confirm that concat("SaveToSharePoint /url=http://server/site/docLibrary /xpath=/my:Form/my:group36/my:group37/my:group38/my:AttachSection /name=",@qRulesNewFileName) works even on multiple files uploaded at the same time.

  • 11-01-2019 07:08 AM In reply to

    Re: qRules SaveToSharePoint Help (file name)

    Looking at the documentation, I think you'll need to use namexpath instead. Is AttachSection your repeating group? I'd probably add a field there with a default calculated value that concats the system generated code with the file name - or whatever you wish to use. Then you can use namexpath=my:NewField (whatever the name of your field is). Does that make sense?
    Hilary Stoupa

  • 11-14-2019 03:53 PM In reply to

    Re: qRules SaveToSharePoint Help (file name)

    Just tested and it worked! Thanks a lot for this, Hilary :D
    Hilary Stoupa:
    Looking at the documentation, I think you'll need to use namexpath instead. Is AttachSection your repeating group? I'd probably add a field there with a default calculated value that concats the system generated code with the file name - or whatever you wish to use. Then you can use namexpath=my:NewField (whatever the name of your field is). Does that make sense?
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.