Editing infopath 2010 form when using XML - InfoPath Dev
in

InfoPath Dev

Editing infopath 2010 form when using XML

Last post 02-26-2015 06:21 AM by adriancarteratx. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-24-2015 06:14 PM

    Editing infopath 2010 form when using XML

    I built an infopath 2010 form that has both repeating and non-repeating fields. In order to get non-repeatig fields I had to create an XML file and bind the project name form control to the prject name XML. The problem I am having is when I go to the list item and try to edit there is no data in the project name text box control. My question is why is the project name text box control empty when i go to edit the list item in sharepoint 2010?

    Here is an example of the xml code I used.

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
    <projectname />
    </root>

  • 02-25-2015 12:27 PM In reply to

    Re: Editing infopath 2010 form when using XML

    InfoPath only saves data in the main data source. Why did you have to add a secondary data source to have a non repeating field? Is the form based off a database?

    Hilary Stoupa

  • 02-25-2015 03:34 PM In reply to

    Re: Editing infopath 2010 form when using XML

    This form is not based off a database.  Just a list view.  The form is a work request for a dept for a client I am working with. Currently the people making the request have to fill out the form for every channel of their marketing campaign (Phone, email, direct mail...)  I created the non-repeating fields and XML to capture data that stays the same per channel. The repeating fields they can add channels for that data that does change.  When submitted this creates X line items(depending on how many times you make it repeat) in the list.   The issue is when you go to edit one of the line items (I can see all the fields populated in the list), it pulls up the form and any of the fields that I used XML for do not display any of the data.  Thank you for responding.

  • 02-25-2015 03:37 PM In reply to

    Re: Editing infopath 2010 form when using XML

    The data will only be saved from the main data source. Your secondary XML file cannot store data. So if you have a control bound to it, as you have found, that data is not saved. Since this is a list form, you'd need to add the project name as a field in the list.

    Hilary Stoupa

  • 02-26-2015 06:21 AM In reply to

    Re: Editing infopath 2010 form when using XML

    Thank you for your response and helpful insight. Based on your comments and my further research, it appears that a secondary data source (XML in my case) does not store data and therefore when I open my form to edit it in SharePoint, the data is not showing in the controls due to the data not being stored in the controls because the I am using a secondary data source for the non-repeating controls.

     

    With that being said, how can we fix the issue we are having while keeping the secondary data source in place? In other words, is there a workaround to have the data show in these controls when we open the form while keeping the secondary data source in place? We need this secondary data source to be able to put non-repeating controls (for data that is consistent for all line items).

     

    Regarding your comment about making the project name a field in the list…do you mean make project name a field in the XML list? If so, can you give us the code for that…is it something like <Field:projectname /> ?

     

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