Difficulty Receiving Data - doc library - InfoPath Dev
in

InfoPath Dev

Difficulty Receiving Data - doc library

Last post 11-12-2009 09:49 AM by Patrick Finnicum. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-12-2009 07:58 AM

    Difficulty Receiving Data - doc library

    TIA for any and all help.

    Running across something that has me stumped.  Have an IP form published to a doc library.  I can create a new one and submit it to the library and everything there works beautifully.

    Added a new field to the doc library called "NextStep" and set the default to 0.  Added a new receive data connection to the form to grab this value, only for data for the active form only.  Form is not grabbing the value from the new field, either the initial value or if it changes (and then form reopened).

    I have tried:

    • creating an expression popup rule when the form is opened to display the data connection value.
    • creating a rule to query the data connection, before displaying anything.
    • creating a rule to set a textbox value to the data connection.
    • set a textbox's default value = the data connection value.
    • disqualifying the new field, pointing the data connection to the title of the doc library item.

    Nothing seems to be working.  Anyone run into something similar?

  • 11-12-2009 08:09 AM In reply to

    Re: Difficulty Receiving Data - doc library

    Did you add it to the SP library or to the form and then promote it to the library?  Just adding a column to the form library will not make it show up in the form.  I recommend creating the field in the form template, set your default value in the form, promote the field, and then go from there.

  • 11-12-2009 08:42 AM In reply to

    Re: Difficulty Receiving Data - doc library

    thanks warrtalon... 

    i'm hesitant to promote the field, as it turns read-only and my workflow on the SP end cannot manipulate it.  i might be able to override that in a c# workflow using elevated privs -- just trying to avert a headache.

    just so i'm reading your post correctly, the following recipe will not work?

    1. In SharePoint:  add a column to the form library, let's say a number without decimals just to make it simple.
    2. In InfoPath Form:  add a new receive data connection pointing to the new SharePoint column for only that form data.
      1. comment:  InfoPath receive data connections currently recognize new columns added to form libraries as a valid data source.
    3. In InfoPath Form:  add a "form open" rule that queries the data connection (unsure if that's needed)
    4. In InfoPath Form:  set a text field = the new receive data connection, either through a "open form" rule or as the default value of the field.

    on the surface, it doesn't seem to be a complex matter.  or am i venturing into an immature/undocumented feature of IP?

    thanks again for your attention, warrtalon (or anyone else that jumps on the discussion).

  • 11-12-2009 09:19 AM In reply to

    Re: Difficulty Receiving Data - doc library

    If you want your workflow to be able to manipulate the field, then simply check the box during publishing that says "allow this field to be edited in SharePoint."  That's what I do whenever I need my workflow to be able to edit a field in the form.  It actually edits the field in SharePoint, which then syncs with the form the next time it's opened.  If you can avoid changing the value with the workflow and instead use conditional rules in your submit buttons within the form, that would be best.  This is how I typically do it for changing my workflow status...

    As for the method you're using, it should work.  I don't know why it's not.  The key point is #2.  What do you mean when you say "to the new SharePoint column for only that form data."  How are you making a data connection that only goes to a form?  You can't do that, so I don't know if that's the issue or what.  All you can do is make a data connection to the library, and it will retrieve data for all items in the default view of the form library.  Then, it's up to you to use filtering to retrieve only that field's value for the current form.

    Don't do #3 - that is done by the data connection settings itself on the last page of the wizard where you check the box that says "automatically retrieve data."  Don't do it twice with a form load rule.

    For #4, instead of a form load rule, just set a default value on the field and set it like this:

    DecimalField(fromSP) where Title(SP) equals strFilename(form)

    Or, you can compare some other field that defines your form.  To use the Title of the form, you'll need to use something like my technique in this blog:

    InfoPath – Auto-Generating Filenames

    If you use my technique, then you have unique filenames that allow for subsequent editing and don't rely on the user to type in a filename.  You then know for sure that you have a piece of metadata that you can compare between the SP retrieve data connection and your form itself.

  • 11-12-2009 09:29 AM In reply to

    Re: Difficulty Receiving Data - doc library

    That solved it.  I agree, much easier than workflow manipulation.  Truly appreciate your help.

    sorry...   "to the new SharePoint column for only that form data" -> "Include Data for the active form only" checkbox.  guess i should've been more precise with that.

    anyhow, i'm taking you up on the promotion technique. 

  • 11-12-2009 09:38 AM In reply to

    Re: Difficulty Receiving Data - doc library

    Where is that checkbox? I'm not familiar with what you're talking about there.

    Ok, I found it.  I've never used that.  What I see is that the setting does work, because if you drag the repeating group from that data connection to the canvas and let it create a repeating table, then when you open a form it only shows the data from that one form.  However, trying to set another field in the form's main data source to the value of those fields does not show anything unless you use the filter method I mentioned.  Interesting.

  • 11-12-2009 09:49 AM In reply to

    Re: Difficulty Receiving Data - doc library

    (for the sake of those who follow this conversation at a later date) 

    manage data connections -> Add -> Create/Receive -> SharePoint -> (provide server) -> (provide list)  -> checkbox is here, below where you select the fields/columns.

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