Set a field based on boxes checked in a repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Set a field based on boxes checked in a repeating table

Last post 09-15-2012 06:35 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-13-2012 12:17 PM

    Set a field based on boxes checked in a repeating table

    Is it possible to st an approval field based on lines checked in a repeating table.

    My example, I have a status field with four choices:

    • Pending (Default)
    • Approved
    • Partial Approved
    • Rejected 

    I have a repeating table, with lines and a checkbox at the end, if just one line in the selection is checked, then the field should change to Parital Approval

    If all liines are checked then the field should change to Rejected.

    Can anyone help please?

  • 09-14-2012 07:15 AM In reply to

    Re: Set a field based on boxes checked in a repeating table

    Hi Kizzie,

    The way I would do it would be to add a hidden field in the repeating table called number with rules on the checkbox to make the number 1 if checkbox is checked and 0 if it gets unchecked.

    Then I would have 2 more hidden fields outside the repeating table one called count and one called total with the default values of each count([checkbox field name here]) and sum([number field name here])

    Then I would put some rules on the submit button where the conditions would be if count = 0 then set status to Pending,

    if count is greater than 0 and count is less than total then set status to Partial Approved,

    if count is equal to total then set status to Approved

    There may be an easier way but this is what I could come up with.

    Hope this helps,

    Sophie

  • 09-14-2012 10:11 AM In reply to

    Re: Set a field based on boxes checked in a repeating table

    Thanks sophie,

    I came up with something similar, but two boxes 

    • 1 that counts the number of rows,
    • 1 that counts the number of rows checked

    If number of rows is greater than 0 , but less that the total rows then set as "Partial Approval"

    If number of rows is equal to number of rows checked, then set to "Rejected"

    But I cant seem to get both rules to work in harmony, one seems to dominate the other, its driving me crazy!

  • 09-15-2012 06:35 AM In reply to

    Re: Set a field based on boxes checked in a repeating table

    Where have you placed your rules?  I'd suggest placing them on the CheckedFields tally field instead of the checkbox field.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.