Problem with infinite loop in Browser Form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Problem with infinite loop in Browser Form

Last post 01-07-2020 11:15 PM by bluetopp. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-06-2020 02:24 AM

    Problem with infinite loop in Browser Form

    Hello! I am having trouble getting my InfoPath form to work as a browser form. The form is for checking service of emergency lightning in buildings. The form works by selecting a certain building from a dropdown field, it will get the number of emergency lightnings which corresponds to the building. This will get the emergency lightning items to a repeating table to main data source. The data is fetched from a SharePoint List and is in the end publishing the data in a document library. The data is getting converted from Secondary data and to Main data by setting the default values with a formula (xPath). I am using the method by setting groups to the default values in the main data source. My problem is when a building is having more than 16 emergency lightnings, the browser form will crash and prevent it from going in a infinite loop. It does work perfectly fine when running locally, but when uploaded as a browser form it wont work. The form must work as a browser form. Is there a workaround for this? Or is it simply limitations to Infopath?
  • 01-06-2020 07:45 AM In reply to

    Re: Problem with infinite loop in Browser Form

     I'm wondering if you might be able to get around this using rules instead of defaults. For example, you could try adding a node to your main repeating data source (doesn't have to show on the form) called "Set" or something. When a new form is started, in the form load rules, or any time after your query for the correct secondary data is completed, set that new helper node to 1, or "go" or whatever. Use rules on the set field to set all the main data source nodes - you can use a count of preceding siblings to get the correct 2ds node. You might want to make a copy of your current form, and try switching over to this technique - and not worrying about getting the correct value for each row to start - so that you can quickly test and see if the approach succeeds in the browser w/out the rule count error.

    Another thing to check might be rules on your fields that have default values -you may have some side effects there. You could simply disable any rules, see if the issue still occurs, then debug from there.

    Hilary Stoupa

  • 01-07-2020 12:52 AM In reply to

    Re: Problem with infinite loop in Browser Form

    That seems to have made the trick! It works! Thank you so much Hilary! :-) Can't believe i didn't try that before...
  • 01-07-2020 01:09 AM In reply to

    Re: Problem with infinite loop in Browser Form

    The only thing that i can find as a drawback is that after i have selected the building number, i cant select another one (wont update, i guess the rules only run once). But its better than nothing
  • 01-07-2020 07:37 AM In reply to

    Re: Problem with infinite loop in Browser Form

    You can fix that by resetting the "Set" node. So, for all your rules that run to set values, run those only if set is equal to one or go or whatever you are setting it to. Then for your last rule, set the field back to blank - that way it is ready to go again when something changes and it needs to re-fire. Make sense?
    Hilary Stoupa

  • 01-07-2020 11:15 PM In reply to

    Re: Problem with infinite loop in Browser Form

    Yes of course, thanks for the help! Works great now :)
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.