SaveToSharepoint - InfoPath Dev
in

InfoPath Dev

SaveToSharepoint

Last post 01-23-2011 03:21 AM by jonathanm. 22 replies.
Page 1 of 2 (23 items) 1 2 Next >
Sort Posts: Previous Next
  • 12-06-2010 12:58 PM

    SaveToSharepoint

    With the SaveToSharepoint function, is there any way to return the document id from the library along with the qRulesFilename and qRulesLink?

     We have been working a lot with this in an effort to find a way to keep the attachments sorted along with the form in the same library or sort them similarly in a separate document library...  because we cannot affect the name of the attachment or write the necessary columnar information into the library with the attachment (as you can do with the SharePoint List tool) we are kinda stuck.

     Our requirement is to allow check out, editing and versioning of the attachments without actually opening the form - and also to link the attachments to the form they came from in the library display...

     If I could capture the library id's of the attachments, I think that would do it.

  • 12-06-2010 01:06 PM In reply to

    You can use the GetItem operation of the SharePoint copy service to get the ID -- data connection to http://server/_vti_bin/copy.asmx then select the GetItem operation.

    Set the query param to the URL of your link, then run the query. The Id will be the Value of the FieldInformation group where the InternalName is ID.

    Hilary Stoupa

  • 12-10-2010 01:09 PM In reply to

    I finally got to try this today and it worked for the first URL in the repeating table...  Is there a way to make it repeat and capture the ids of all the attachments?

  • 12-10-2010 01:50 PM In reply to

    What did you set your rule on? I'd try setting it on the qRulesLink field itself, if that isn't what you tried. I'd anticipate if the qRulesLink field repeats, you'd get the id for every attachment....

    Hilary Stoupa

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

    I set the URL field from GetItem to the qRulesLink field.  I set the id field in the repeating table that I wanted to populate to:  @Value[@InternalName = "ID"]

     As I said, it works for the first attachment, but returns the id for the first attachment to subsequent attachments in the list.   Hmmm.

     

  • 12-10-2010 02:18 PM In reply to

    I'm trying to find out what you set the rule ON -- is it on a button? A field? When does your rule fire?

    Hilary Stoupa

  • 12-10-2010 02:22 PM In reply to

    I placed it on a button by itself - to test.

  • 12-10-2010 02:27 PM In reply to

    Great. Where is the button located? Inside the repeating section that has your assumedly repeating qRulesLink? If it isn't in the repeating section, I'd assume it would only get the first ID....

    Hilary Stoupa

  • 12-10-2010 02:27 PM In reply to

    I just tried it on the qRulesLink field, but the result was the same.

  • 12-10-2010 02:34 PM In reply to

    Is your field repeating?

    Can you post or send me a sample of your template so I can better understand what you are trying to do?

    Hilary Stoupa

  • 12-14-2010 07:03 AM In reply to

    This might explain it.  The qRulesLink "field" is actually a hyperlink - but it is in a repeating table group.  I tried placing a new column with the button in it, but that does not work either.

    I have attached the template.  The user fills out the BOC Mtg Date, Type of Agenda Item, Contact Name info - then adds attachments and clicks submit.  The form goes to one library and the attachments go to another.  The form stays open to receive back the attachment links. 

    If the folks I am doing the form for wanted to open their attachments from the form - we would be done...  They want to be able to edit the attachment documents as separate files, so they can do check out, versioning, etc....  The attachments, however, still need to be linked to the form from which they originated visually.

    I thought if I could capture the id's of the attachments, I could write a workflow to handle keeping the attachments linked to form in some way.  I have already tried everything I can think of to keep the attachments and the form together and separate at the same time...

    If I put the attachments in a list, I can write the necessary metadata (BOC Mtg Date, Agenda Item Type, Agenda form unique ID number) out to the list, but I cannot do check out from a list...

    If I write the attachments to a library, I cannot write the necessary metadata to keep it with the form or sorted in the same fashion as the forms. 

    I just wish I could give the attachments a name of my choosing that involves the unique Agenda form ID number or something.  The random name is really problematic.

    How do other folks get around this?

     

  • 12-14-2010 07:07 AM In reply to

    Also here are a couple of screen shots of the attachment and form libraries.

  • 12-14-2010 09:38 AM In reply to

    Hi Donna, I don't see any screenshots attached in that last post of yours.

    Ted

  • 12-14-2010 10:09 AM In reply to

    Hi:

    Okay, I see the rule on your link to set the URL of the GetItem data source and to run the query -- where are your rules to set the id field? I'd expect to see that as a rule right after you run the query. Instead, it seems that you are using a default value in your id field. Try removing the default value in your ID field, and instead, on your rules for the qRulesLink field, add right after the GetItems query, a rule to set the id field to the returned ID value... I have a feeling that the default value is overwriting, so that the last ID you get in GetItem is going to be the ID for all of the id nodes. Does that make sense?

    Hilary Stoupa

  • 12-14-2010 10:45 AM In reply to

    Well, that worked!!  YAY!...  and yes, that is what it was doing - putting in the last ID number for all attachments...

    Now I guess the user would have to click a button for each attachment???  Not so good.  Hmmm.  I tried moving the button out of the repeating table and placing the rules on the qRulesLink field itself, but that didn't work...

    I was actually hoping I could do this on the submit button...  sounds like some code would have to be written or something?

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