Rule - If all values in a repeating field do not contain field string - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Rule - If all values in a repeating field do not contain field string

Last post 10-26-2012 01:13 PM by kcorbet. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-26-2012 11:01 AM

    Rule - If all values in a repeating field do not contain field string

    Hi InfoPathers,

    I have a repeating table in the main data source.  One of the repeating fields (CTIssue) in the table is drop-down control that gets its choices from the secondary data source. 

    In a seperate view, I added the same secondary data source as a repeating section.  I am attempting to apply a rule to repeating section to hide it if all instances of the main data source repeating field (CTIssue) do not contain the secondary data source field (SYIDNo), then hide the respective repeating section of the secondary data source.  Note: SYIDNo in the secondary data source contains the possible values that can be selected in CTIssue

    The following configuration does not hide the sections, it shows all of them, any insight as to what I am doing incorrectly would be greatly appreciated.

    Rules

    Kevin
  • 10-26-2012 11:11 AM In reply to

    Re: Rule - If all values in a repeating field do not contain field string

    Do you want to hide an individual row that doesn't match or do you want to hide the entire repeating control?  If its the former, you could try using a formatting rule.  I think you also may want to select just the CTIssue field instead of ALL.  If its the latter, then you'll need to surround the repeating control in a section then apply to the rule on the section instead of the repeating control.  Hope this helps.
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 10-26-2012 11:33 AM In reply to

    Re: Rule - If all values in a repeating field do not contain field string

    Hi Anson,

    Thanks for your quick reply.  The screenshot I included was a formatting rule I applied to the secondary data source repeating section, set to hide the section if True.  Of note: the secondary data source is an info path library with selected fields from each form brought through the data connection (SYSIDNo is field I am filtering on).

    If I select CTIssue (without adjusting the drop-down when selecting it to look at 'all') the rule works and filters the secondary data source repeating section.  However, it is only looking at the first ocurrence of CTIssue in the main data source repeating table.

    Kevin
  • 10-26-2012 01:13 PM In reply to

    Re: Rule - If all values in a repeating field do not contain field string

    As a work around I created a new field and I set the default value using the eval function to build a dilimited string of CTIssue values from the main data source repeating table
    Default value formula: eval(eval(Control_Table, 'concat(my:CTIssue, ":")'), "..")

    If I use this new field in place of 'All Occurences of CTIssue' in the rule (screen shot above) it works.  I really don't want to use this approach because it adds another field to a form with a lot already.

    If anyone is able to understand why this work around worked, and using 'All Occurrences of CTIssue' didn't, I'd really appreciate it.

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