Some things you can do with IP codelessly - InfoPath Dev
in

InfoPath Dev

Some things you can do with IP codelessly

Last post 04-04-2011 08:14 AM by Alec Pojidaev. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-31-2011 07:21 PM

    Some things you can do with IP codelessly

    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:

    1. Adding a column to the repeating table with an integer datatype, calling it something like 'watcher.'
    2. 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>."
    3. 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
  • 04-01-2011 09:58 AM In reply to

    Re: Some things you can do with IP codelessly

    Hey, Qwerty!

    Thanks so much for the great post. Here's a link to a sample form that uses preceding-sibling to create a row number....

    Hilary Stoupa

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