Repeating Table Shows Duplicate Default Values - InfoPath Dev
in

InfoPath Dev

Repeating Table Shows Duplicate Default Values

Last post 04-12-2016 01:48 PM by KenNC1. 25 replies.
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts: Previous Next
  • 04-08-2016 08:40 AM

    Repeating Table Shows Duplicate Default Values

    Please Help! 

    I've seen this problem posted previously, but have never seen an answer.  Here is the problem:

    I have an InfoPath Filler form with a repeating table.  I have set up default values each row/column of the table, for a total of 60 rows.

    When the template is published and a *new* form is created, the repeating table displays as expected: the default 60 rows populate the table with default column values.

    When an *existing* form is opened, the repeating table displays 60 rows, but all of the data is a duplicate of the first default row's data. 

    I have re-published the template and cleared InfoPath cache, but the results are the same.  New forms work fine, existing forms do not.

     Any ideas?  

  • 04-08-2016 12:11 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    It sounds as if this might be an issue with how your defaults are set up. Do they come from a secondary data source? I take it you have set up the form to include 60 instances of the repeating group by default?
    Hilary Stoupa

  • 04-08-2016 12:29 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    The default values come from the Main data source.  When I export the source files from the template and look at the template.xml, the default values look OK in the xml -- all are present.  When I publish and open a new form, everything looks great.  It's only when I open an existing form that I see that all of the rows are populated with the first default row values.  When I save the form and look at the underlying xml, I see that only the values from the first default row were used to populate all rows of the repeating table. 

  • 04-08-2016 12:40 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    Are you sure you have no rules or anything resetting things? It sounds like something a rule might do - I ask because I am currently working on a form where I've got default values set and this is most definitely not happening in my form. Can you check your rules? If you'd like me to take a quick look, email me the template, you have my email. :)
    Hilary Stoupa

  • 04-08-2016 01:20 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

     

    I’m sorry, but I don’t believe I can email the template to you.

     

    I removed all default row values except for two rows (60+ was too many to deal with) and I am still seeing the problem.

    The first default row appears twice in the table.

    I do not see any rule that is setting fields in the table.

  • 04-08-2016 01:44 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

     I deleted the two default rows and rebuilt them and I get the same result.

    A new form created with the published template looks good.  A form created with a prior version of the template (before the repeating table and defaults were introduced) does not work.  Only the first default row is displayed, and will be displayed for as many default rows are defined. 

  • 04-08-2016 02:08 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    I think you are saying that you changed the template to include these new default rows? And you are wondering why already created XML aren’t getting the new rows? I think InfoPath is only going to use template.xml for a brand new form (which is where your new stuff is). If you fill and out submit XML from your new form, and reopen that, are all the rows there with the correct values?
    Hilary Stoupa

  • 04-08-2016 02:17 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    When I fill out a new form created with my new xsn file (the xsn with repeating table and default values) , save the file, and reopen the file, the values are saved correctly and everything looks great.

    When I open an existing xml that was saved using an xsn version that did not have the repeating table and default values, I see the repeating table in the form, but only one default value is displayed, and it is displayed one time for each default row that I have defined. I was expecting to see the repeating table on the form, with default row values populated -- just as I saw when I opened a new form.

     

  • 04-08-2016 02:41 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    I don't think the rows are going to be populated with the defaults in the updated template in old XML.
    Hilary Stoupa

  • 04-09-2016 01:50 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

     Hi Hilary -- Here is a post from 2010 from a poster with a problem very much like mine.   I don't see where the issue was resolved.  At this point I think it is a bug in InfoPath.  On existing forms, the repeating table default values are simply not implemented correctly.  They are either missing, or are duplicated as the poster indicates.

     http://www.infopathdev.com/forums/p/29835/102099.aspx 

  • 04-10-2016 01:56 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    Hi again Hilary -- 

    I was able to recreate the issue today in a test template, and I've attached the template to this post.  Here are the steps to recreate:

    1. Create a template with two text boxes.
    2. Publish the template.
    3. In the form library, create a New form.  Review and confirm that the form contains only the two text boxes.  IMPORTANT:  Save the form back to the form library.
    4. Edit the template to add a repeating table with three columns.  Using the Data --> Default Values menu item, create four additional repeating groups -- assign unique default values to each column in each of the four rows. 
    5. Publish the modified template.
    6. In the form library, create a New form.  Review and confirm that the form now contains the repeating table with four default rows, in addition to the two text boxes from the first version of the template.  Confirm that repeating table default rows/column values are correct.
    7. Open the form saved in Step #3 above.  Confirm that the form contains the two text boxes from the first version of the template, and the repeating table from the second version of the template.  Confirm that the default rows are present with column default values.

    When I perform the steps above, I see the default values for row 1 in the repeating table duplicated 3 times.  When I save and view the xml for the existing form, the repeating table nodes in the xml look like this.  Please note the duplicated default values.

     

     

    Is this expected behavior?  If so, how can I populate default values in my repeating table so that when a user opens a previously saved form, they will see the new repeating table in the form with non-duplicated default rows?

    I'm sure I'm doing something wrong, or thinking about this incorrectly.  Any ideas? 

     

     



       

  • 04-10-2016 02:14 PM In reply to

    Re: Repeating Table Shows Duplicate Default Values

     Template was sent via email.  Thank you for your help.

  • 04-11-2016 07:49 AM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    I must not have been clear in my post above. I think if you are going to make this kind of a change the existing XML are NOT going to update with the added defaults. InfoPath uses template.xml for a new form, then applies the upgrade.xsl for existing.... so I think you'll have to either write custom code to upgrade your existing XML on open, or do something to manually add this new data to the existing files (I like PowerShell for this).
    Hilary Stoupa

  • 04-11-2016 08:38 AM In reply to

    Re: Repeating Table Shows Duplicate Default Values

     Thank you again, Hilary. 

    Aside from modifying my existing forms to include the default repeating nodes, is there a way to populate default rows in the table without using the Data --> Default Values method?

     

     

  • 04-11-2016 08:50 AM In reply to

    Re: Repeating Table Shows Duplicate Default Values

    Not without code (or qRules, if you use that?)
    Hilary Stoupa

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