Hello InfoPathDev community,
I'd like to share a couple of things I've been able to do codelessly with InfoPath before that will probably help you a lot.
'For' Loops (example):
InfoPath runs the set of rules corresponding to a particular field when the value in that field changes. If part of a rule is to change
the value of the field to which belongs, a loop is created, which can be stopped by placing a condition on the rule.
You can control the length of a loop by creating a field with an integer datatype, defaulting it to zero, and adding 1 to it in each rule,
and conditioning the rule to run if the field is less than you desired breaking point.
Changing the value in a specific row of a repeating table (example):
When you change the value of a field in a repeating table from inside its row, only that occurence of the field is affected. When you change
it from outside the repeating table, all occurences of it are affected. However, you can trigger an individual change in each row of the
repeating table by:
- Adding a column to the repeating table with an integer datatype, calling it something like 'watcher.'
- Adding a rule to 'watcher', something like "IF <ID of Row to Change> Is Equal To <Id of This Row>
THEN <do something to some fields in the row>."
- Add a rule outside the repeating table to set 'watcher' to 'watcher + 1'.
There are numerous post on this forum for creating an ID with the default value formula "count(previous-sibling::my:repeatingTable)"
if you need an ID. (Could someone else post it on this thread?)
Have a great day and I hope this helps you!
Qwerty