qRules file name - SaveToSharePoint - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qRules file name - SaveToSharePoint

Last post 11-04-2010 08:18 AM by Jimmy. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 10-11-2010 01:38 PM

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    qRules file name - SaveToSharePoint

    How does qRules determine the actual filename for an attachment that is saved to a list.  For example, I can save an xml file named "Context.xml" and the following will happen:

    Q Rules Link: http://mySP_Site/Attachments/2010101115295242027_Context.xml

    Q Rules Filename: Context.xml

    Link to File: Context.xml

    This is working as expected, great I might add!  Thanks qRules!  What I am trying to do is setup versioning on my library so when I need to make a change, I could open the form, remove the attachment, add a new attachment and have it add a new version in the library.  I setup my source field as repeating so the section is working properly.

    Is there a way to have the name that is generated in the SP doc library be the same as the "Q Rules Filename" ?

    Thanks,

    Eric

  • 10-11-2010 10:29 PM In reply to

    Re: qRules file name - SaveToSharePoint

    Hi Big E,

    Happy to hear it's working for you! Thanks for the positive comments.

    One easy solution is to not allow users to subsequently attach. Just replace the qRules link's "http://" prefix the "file://" prefix so that users can open the attachment directly from the form and edit it. Then they have to open separate to edit.

    qRules use the GetAttachmentAttributes command (introduced in v2.2) to determine the filename. To that filename it prepends a unique prefix using date and time stamp plus and underscore. We are currently investigating adding a feature in v2.4 of qRules to allow specifying your own name. In the meantime, I recommend the easy solution above.

    We have already added a function to v2.4 to submit an XML file or node to a separate Document Library (as a separate file). That may provide a workaround since you could just treat it as an XML file and not a file attachment. But, I'd have to investigate a little more to give you a definitive Thumbs Up. Send me email if you want to beta test v2.4 (you'll get the free upgrade when we release in December/January timeframe).

    Thanks for your support!

    Patrick Halstead
    Project Manager at Qdabra
  • 10-12-2010 07:44 AM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

    Just to clarify, when you say to not allow users to subsequently attach, you are meaning not to have the attachment control as a repeating field.  Correct?  Also, I don't believe I follow what you are saying about replacing the links.  Where would I do this?

  • 10-12-2010 06:54 PM In reply to

    Re: qRules file name - SaveToSharePoint

    Hi again,

    Were you using the repeating field to capture history? That's an interesting technique. The issue is overwrites. qRules doesn't support specifying a name because if it's not unique we would need some other option to force overwrites or fail if an existing file exists. Also, if two people have different forms open with the same attachment, there could be a "tragedy of the commons" in rare instances when the filenames match. So, qRules takes the simple approach of always creating a new file.

    If you want to store history you will need all of those previous versions anyway.

    If you don't want to store history, you can change the link of the file after it is attached the first time. Create a separate calculated value in your form that uses "file://" instead of "http://" for the prefix to the link. Users who click on this will be able to open the file directly from SharePoint and edit out-of-band. SharePoint enforces lock permissions.

    You could also just store all previous versions but hide links to old versions - just show links to the most recent. Qdabra's Database Accelerator (DBXL) also supports storing all previous versions of images in a database and gives more options for overwriting and updating.

    If you've purchased qRules, we can provide an hour of free hands-on support. Let us know.

    Best!

    Patrick Halstead
    Project Manager at Qdabra
  • 10-21-2010 07:25 AM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

     

    Patrick Halstead:
    You could also just store all previous versions but hide links to old versions - just show links to the most recent. Qdabra's Database Accelerator (DBXL) also supports storing all previous versions of images in a database and gives more options for overwriting and updating.

     

    I think this would work just fine.  I get what you are saying about using the same names.  It could become an issue later on if someone used the same name.  How would I go about hiding the links to the old version.  Also, could I have a view that could show all previous versions?

    -Eric

     

  • 10-21-2010 08:06 AM In reply to

    Re: qRules file name - SaveToSharePoint

    To hide previous, you'll need to add the link to a section and then add a formatting rule on the section that hides it if the position() isn't equal to count(). I.e. only show the last one.

    Yes, you can just drag and drop the data source into a Debug view.

    Patrick Halstead
    Project Manager at Qdabra
  • 10-21-2010 09:00 AM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

    Can this be done with InfoPath 2007?  Maybe I'm just looking in the wrong spot.  I have a repeating section setup for my file attachment control.  I have an option to add a rule for the section but nothing for adding a formatting rule.

  • 10-21-2010 09:27 PM In reply to

    Re: qRules file name - SaveToSharePoint

    Try right-clicking the repeating section and clicking Conditional Formatting.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-02-2010 08:57 AM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

    I'm still pondering different scenarios for this issue.  Here is the latest and I will try to go in as much detail as possible.  I will start out with our current process.

    We have a ticketing system that allows multiple attachments and includes version control.  For example, I may attach ten different attachments, but for one of those I might have six different versions.  Sounds simple enough.

    We  purchased qRules and I was able to extract the attachment from the form and send this to a document library.  Well, the issue then became that the filename that was used by qRules was actually a time stamp.  This will prevent versioning because the filename will never be the same.  As Patrick pointed out earlier, this was done for a reason.  If I have a file named "Requirements Document", and it stores the document library, and then someone else uses that same filename, it would overwrite the version.

    My thought is, what if a subfolder could be created for the document library that would match up with either the id of the form or name of the form.   Have the attachments extract to the subfolder instead of the document library, maybe even return the link to the folder named "Versions".  This way, if I used the name "Requirements Document" as an attachment, it would be segregated to the subfolder instead of the entire document library.

    Is this possible?

  • 11-02-2010 04:23 PM In reply to

    Re: qRules file name - SaveToSharePoint

    Hi Eric,

    Yes, that should be possible and you should be able to change the command in qRules to dynamically take the subfolder name (use concat). You'll end up with a lot of subfolders though.

    Anyway, let us know if we can help in any way.

    Patrick Halstead
    Project Manager at Qdabra
  • 11-02-2010 04:32 PM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

    I will definately need help on this.  If we need to talk support cost, let me know.

  • 11-03-2010 10:56 PM In reply to

    Re: qRules file name - SaveToSharePoint

    Hello Big E,

    How about using a repeating section within a repeating section like in the attached (very simplistic) example to keep track of versions for different files?  Using qRules, you can augment the functionality to restrict users from removing rows that are already keeping track of files.  This would save you from having to manage a whole lot of subfolders.

    Might this approach have any appeal to you?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-04-2010 06:16 AM In reply to

    • Big E
    • Top 500 Contributor
      Male
    • Joined on 02-18-2009
    • Alabama
    • Posts 35

    Re: qRules file name - SaveToSharePoint

    Would it be possible to hide all previous versions and a way to show all versions?  This could work.  I just need to be able to access previous versions for auditing purposes but I don't want to clutter up the form with a whole bunch of files.  Also I noticed that this is not a browser based template.  Will there be any issues running this inside of the browser?

  • 11-04-2010 08:18 AM In reply to

    Re: qRules file name - SaveToSharePoint

    This should work fine in a browser as far as I know.  Here's an example of how you can toggle the visibility of previous versions using just rules and conditional formatting.  You can also use similar formatting to show only the most recent versions in one view, and show all versions in another view.

    With qRules you can get some more sophisticated functionality like restricting users from deleting rows, or adding multiple blank rows.  Please purchase some support credits if you would like to pursue that angle further.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (14 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.