Respuesta propuesta Update infopath form field value in sharepoint document library using codes

  • viernes, 05 de febrero de 2010 11:52
     
     

    Hi Experts,

    I am working on a Infopath application having multiple stages workflow and form data is stored in the SQL database. The form has a repeating table "Product table" and some calculation logic behind this table.
    Now due to some requirement calculation logic has changed so it is only applicable to the new forms not for old approved form. Business requirement is to update the existing or old forms as well.

    So what is the way to update the old form's calculation.

    Am I clear to all experts, if any doubt in my question please let me know?

    Any help will be deeply appreciated.

    Thanx.

    • Editado Ram_Kr viernes, 12 de febrero de 2010 12:54 Spelling
    •  

Todas las respuestas

  • viernes, 05 de febrero de 2010 14:45
     
     
    By using "the code"?  What code?  Are you saying you want to write custom code for updating InfoPath form fields?  What is your scenario?  When do you want to update the field?  How do you want to update the field?  Is this a workflow or something else?  Your request is way too vague.

    You shouldn't need code to update your ofrm fields in InfoPath unless you are talking about something not related to Infopath. 
    - You wrote this in the InfoPath forum, so the assumption would be that you are submitting an InfoPath form.  When you do this, as long as the properties are promoted during the publishing process, then the fields of the form will show up in the SharePoint form library. 
    - If you want your InfoPath form to update fields in ANOTHER list or library, then simply use a workflow that creates or updates list items. 
    - If you have forms that have already been submitted and whose values are already visibile in the form library, but you want to update those fields from some other source, then again use a workflow to update those fields.  Any change in those fields will also reflect inside the form when it is opened next.  To make form library fields from a form editable, you must choose the "edit in SharePoint" checkbox during the publishing process.

    Where do you need "the code"?
    SharePoint Architect || My Blog
  • lunes, 08 de febrero de 2010 9:29
     
     
    Hi Cobb,

    I need to update infopath form field value using utility i.e i published one infopath form template into document library as a content type after that i fill all values and submit the form to document library like this in document library i have 100 forms are submited,but my problem is to modify one of the field vaule of all forms this is my scenario.

    You are saying if the form field value is visibile in the document library we can upload by using the work flow so i need that work flow code and is there any other ways to modify existing form field values could you please tell me  
    Ram Sharma
  • lunes, 08 de febrero de 2010 10:40
     
     

    If you are talking about batch operation, then my answer is “Yes”.  You can do it.

    Try something like below.

    SPSite site = SPContext.Current.Site;

    SPList list = site.AllWebs["Site_Name"].Lists["List_Name"];

     

    SPListItemCollection collListItems = list.Items;

     

    foreach (SPListItem listItem in collListItems)

    {

        listItem["Column_Name"]  = “Your value”;

       

    }


    백상하
  • lunes, 08 de febrero de 2010 10:52
     
     Respuesta propuesta
    Hi Baek,
    I am not asking about list field values i want to update existing infopath form field values in document library.   
    Ram Sharma
    • Propuesto como respuesta Hong Gyem Kim viernes, 06 de agosto de 2010 20:57
    •  
  • lunes, 08 de febrero de 2010 17:27
     
     
    Hi Baek,
    I am not asking about list field values i want to update existing infopath form field values in document library.   
    Ram Sharma
    hi,
    You can to do follow on below
    Hoped that has the help to you
    http://www.youtube.com/watch?v=88Q-AZ-wJYo


  • viernes, 06 de agosto de 2010 21:00
     
     Respuesta propuesta

    Hi RamKumar,

    You can run a batch operation of reading all your existing InfoPath forms in a form library, parse them and re-create the XML strucutre for all your forms updating the field value you wish to modify.

    • Propuesto como respuesta Hong Gyem Kim viernes, 06 de agosto de 2010 21:48
    •  
  • viernes, 13 de julio de 2012 14:03
     
     

    Hi Ram,

    Did you resolve this issue. I have the same problem. Please help!

    Thanks,

    Alex