count(../preceding-sibling::my:[Node]) + 1 is throwing infinite loop error in browser - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

count(../preceding-sibling::my:[Node]) + 1 is throwing infinite loop error in browser

Last post 09-21-2018 05:41 PM by Daniel_5584. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-21-2018 05:41 PM

    count(../preceding-sibling::my:[Node]) + 1 is throwing infinite loop error in browser

    So this is a bit of a strange one and I cannot seem to figure it out; I should preface that I'm fairly new to InfoPath.

    I have a form with a repeating table that is pulling data from a secondary source. In order to grab the appropriate data I have added a field called "counter" with the default value of: count(../preceding-sibling::my:ProductInformation) + 1.

    I want to have the values be static for the user. So I added 9 rows of the repeating table by default. I then use a rule to hide any values where counter is greater than the number of items in the secondary data source repeating table; which I have passed to the main data source in a field called "PTRowCount." I then default "PTRowCount" to 0 and have a rule that changes this value to that of the secondary data source table when the data is queried. This allows for all the rows to be hidden until a query occurs, and then only shows the rows with data in them. 

    This works fine in the InfoPath form filler, but throws the infinite loop error when I try to open the form in the browser.

    I've noticed the following:

    1. At six rows, the form will load without error.
    2. More than six rows will trigger the infinite loop error
    3. At nine rows the first row of the table will always show prior to querying the secondary data source and be blank
    4. At nine rows: If "PTRowCount" is defaulted to 10 then all rows will show, but the count for last row will be blank. (I bound a field in the repeating table to "counter.")
    5. If I remove the default value for counter, I no longer receive the error and everything works fine.

    That's it. I cannot figure it out. I have another form that's using the exact same syntax and pulls data in the same way from the same secondary data source and it always works in the browser. I have tried comparing the rules and actions for each form and they seem to match exactly. I cannot figure out why this form is behaving this way. Any help is greatly appreciated.

     I have attached a copy of my form for reference. 

    Thanks,

    Dan 

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