How to conditionally format based on checkbox in repeating table - InfoPath Dev
in

InfoPath Dev

How to conditionally format based on checkbox in repeating table

Last post 09-30-2019 03:01 PM by Ruenells. 22 replies.
Page 1 of 2 (23 items) 1 2 Next >
Sort Posts: Previous Next
  • 12-01-2011 04:53 PM

    How to conditionally format based on checkbox in repeating table

    I have InfoPath 2010 and am connected to a SharePoint list.  Everything works great until I try to hide/show a section of the form based on what's entered in a repeating table.  My form has three sections. 

    1. A repeating table called Repeating_Table with four columns (three text boxes and one checkbox).  One row is always visible, and users can insert additional lines as they need to. 
    2. A section called Conflict_Detail with two fields (one checkbox and one drop down).
    3. A section called Move_Info with various fields on it.  The Move_Info section shows up only when a particular item is chosen in the Conflict_Detail drop down box.  This part works great. 

    The problem is that I'd like to show the Conflict_Detail section only when at least one of the repeating table lines has a checkmark (doesn't matter how many of them do).  Because the checkbox is in a repeating table, it appears to only look at the first row instead of all rows.  I have tried various controls in place of the checkbox, but nothing appears to work. 

    I have been searching for hours for something that will work and have found some that might work, but I don't understand the answers.  I am not a programmer (by a LONG shot), so I'm hoping for a fairly simple solution that I understand ... since conceivably, I might want to do this again someday.  Thank you! 

  • 12-02-2011 02:18 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    Hi there,

    I tried your scenario offline in a filler only form and my solution seems to work.  I basically had a repeating table with one column as the checkbox.  Another control in the form has a formatting rule on it that says "IF checkboxField = TRUE" then Hide this control.  There might be something difference since you are working with a SharePoint list.  I would double check that you have the correct value for "TRUE" in your if statement.  It should match whatever SharePoint uses when a checkbox is checked in order for your condition to work.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 12-02-2011 03:17 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I can make it work if the checkbox is in the first row of the repeating table.  BUT, if the first row's checkbox is empty and the second row's checkbox is full, the hidden section never appears.  I am using a web-based data entry form.  Any other ideas?

  • 12-02-2011 04:09 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I'm thinking your conditional formatting needs to be based off a count of the repeating group where the checkbox is whatever = checked in your form.

    count(group/repeatinggroup[checkboxfield='true']) > 0

    sort of a thing.

    Hilary Stoupa

  • 12-06-2011 12:31 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    After a lot of angst and cursing, I got that to work.  Thank you so much!  :)

  • 12-06-2011 05:49 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I generally start right off with the cursing. It saves time. :)
    Hilary Stoupa

  • 02-12-2013 07:58 AM In reply to

    • EMSCA
    • Not Ranked
    • Joined on 02-08-2013
    • Posts 12

    Re: How to conditionally format based on checkbox in repeating table

    Hi Hilary,

     

    I'm trying for same kind of senario, I've repeating table with two columns - checkbox and text box, getting values from SP list.  Example repeating table displaying checkbox and City for each row. like below.  I'm trying to hide and show other section(Citi's section) based on checkbox selection. Citie's sections located in other view of the form

    If use select checkbox at LA in repeating table, I should display LA citisection. If use select checkbox at SFO in repeating table, i shoud display SFO citi section. i tried hard on options no luck. Please help me out

    Checkbox  - SFO

    CheckBox - LA

    CheckBox - San Jose

     

  • 02-12-2013 08:36 AM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I replied in the new thread you started here.
    Hilary Stoupa

  • 09-30-2019 12:30 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I am trying to implement this solution and i have the following rule already on the field see below. not(contains(../my:group1/my:group2/my:ItemNbr, "Other")) But i am having the same issue where if it is not in the first row it doesnt fire, how can i adapt your solution?
  • 09-30-2019 12:52 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    May I see your form? You can attach it under the Options tab in a reply.
    Hilary Stoupa

  • 09-30-2019 12:53 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    It is attached
  • 09-30-2019 12:59 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    I think you just need to select "all occurrences" for the field.
    Hilary Stoupa

  • 09-30-2019 01:04 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    i dont have that option...not sure where you are seeing that?
  • 09-30-2019 01:09 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    ok found it but it didnt work
  • 09-30-2019 01:27 PM In reply to

    Re: How to conditionally format based on checkbox in repeating table

    yeah still only showing it on the first line not if it is on any other line.
Page 1 of 2 (23 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.