Infopath Options to Update Records - InfoPath Dev
in

InfoPath Dev

Infopath Options to Update Records

Last post 03-26-2014 01:50 PM by Agent-311. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-21-2014 04:22 PM

    Infopath Options to Update Records

    We have SharePoint Online.  No SQL server, Web Services, or SOAP client integrated. 

    We have been customizing the "New" form so that it can be used to query & manipulate data from multiple lists.

    Management wants to have 1 form that can update multiple existing records on the main data connection (and maybe secondary) without having to "Edit" each one individually.

    By default, you can't, but what are my options?  Qdabra keeps coming up, but the "Top Features" don't clearly list this capability.  I can't get approved a budget to try it.  I need to clearly know what I need to just add new, but update existing.

  • 03-22-2014 03:56 AM In reply to

    Re: Infopath Options to Update Records

    Hi,

    I have been struggling with the same problem. I browsed the web and asked questions in this forums. The only answer I got is relying on a repeating table (http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Add-SharePoint-List-Items-with-InfoPath.aspx is one good source for this type of solution).

    It is working nicely (in your case, I guess you should "Update" command instead of "New") but it involves the user typing in the data to the new form, which is not what I needed, and probably nor do you.

    Here is how I worked around this problem:

    As you probably know, you have the standard URL suffixes http://...../Newform.aspx?ID= and http://.../Editform.aspx?ID= to open a new form or edit an existing one.

    Supose you could add parameters to this URL, which the receiving form could parde and use to initialize/update some or all of its fields. In this case, I think your problem will be solved.

    BUT there is a drawback: The form will open up with the right values in its fields but the user will have to Save or Submit it - an extra, annoying click per form. I have not yet figured out how to work around this one yet.

    If you can live with this, go on reading on how to send these parameters and how to parse them on the receiving end.

    Send Parameters (from "source" form):

    Lets adopt the following(arbitrary)  syntax: $">http://...../Newform.aspx?Params=Var1=<val1>$Var2=<val2> etc.

    All you have to do on the sending side is dynamically configure a hyperlink to concatenate the strings needed for the URL.

    Receive Parameters (in "target" form"):

    follow this great  link on how to do this without resorting to code: http://lyndzhang.wordpress.com/2013/07/22/pass-query-string-to-a-sharepoint-lists-add-new-item-form-that-was-customized-by-infopath-2010/

    You will receive the parameters in a new field you'll need to define (I called it "Params"). You'll have to parse it iand set the required fields accordingly using 'substring-before()' and 'substring-after()' functions.

    I hope this works for you. If you come by a straightforwad solution, I'd love to know.

    YK

      

  • 03-26-2014 11:24 AM In reply to

    Re: Infopath Options to Update Records

    Thanks YK,

     The 1st option won't work for us with it being code. 

    The 2nd link didn't seem to use the "New" form to write to existing records, but pulled data and saved a new record ID?

    I may need to clarify, that using the "New" form template is fine with me, but how can I....

    1. Select "Add New" (Works ok)
    2. Get the "New" form template (Works ok)
    3. Use the "New" form template opened to query data from MAIN DATA CONNECTION (works ok)
    4. Update data for existing data on the MAIN DATA CONNECTION.

    It may be that when you select "Add New" you can only create a new record or export the record via Web Services, BDC, SOAP, ect?

    It seems to update an existing record, I need to open the form from that record (i.e. "Edit" or "View" > "Edit")?

     

     

     

  • 03-26-2014 12:59 PM In reply to

    Re: Infopath Options to Update Records

    Hi,

    You got me confused... I am not sure what you called 1st and 2nd options, but nothing I wrote involved writing code.

    What I tried to suggest is a way to write a new record in another "remote" list, by opening a new "remote" form and passing data to it.

    Then the new form has to only to be saved with this data.

    I guess this can work also for an existing record in the remote list (just use http://.../Editform.aspx?ID= instead of http://.../Newform.aspx?).

    YK

  • 03-26-2014 01:50 PM In reply to

    Re: Infopath Options to Update Records

    york31:

    Hi,

    You got me confused... I am not sure what you called 1st and 2nd options, but nothing I wrote involved writing code.

    What I tried to suggest is a way to write a new record in another "remote" list, by opening a new "remote" form and passing data to it.

    Then the new form has to only to be saved with this data.

    I guess this can work also for an existing record in the remote list (just use http://.../Editform.aspx?ID= instead of http://.../Newform.aspx?).

    YK

     

    Sorry.  I meant 1st link & 2nd link you sent. 

     - The 1st link discussed code & Web Services we don't have.

     - I don't want to save a New Item to the existing or Secondary list, but update lets say, 10 existing records, without opening 10 Editform.aspx files.

     Perhaps...

    Add a calculated value field for each record, where it is a dynamic hyperlink to the Edit form (Concat URL prefix + ID).  When I query the main data connection, the repeating table with the results will have a link to edit each of the query result values?

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