Rules triggered by Repeating section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Rules triggered by Repeating section

Last post 11-03-2010 04:34 AM by greenawayr. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-01-2010 09:50 AM

    Rules triggered by Repeating section

    I'm developing a form with a number of repeating sections, and I was wondering if it is possible to use rules, conditional formatting or code to dynamically change a form based on how many instances of a repeating section there are.

    For example, Repeating Section 1 is Clients.

    If you have one client, there is one instance of the repeating section, however, more than one client, you can add another item so you have two instances of the Client repeating section. If this is done, is there an event or property I can use to influence a field on a different part of the form. The plan being that if two or more clients are entered then a dropdown box will "appear" (through conditional formatting) and be dynamically populated. I can't seem to find any information on a repeating section property for the number of times a repeating section has been repeated.

    Thanks in advance

     

     

  • 11-01-2010 10:03 AM In reply to

    Re: Rules triggered by Repeating section

    The count() function is what you need:

    Condition: count(/path/to/repeating/group) = 1

    Behavior: Hide dropdown box

     What is it you want to use to dynamically populate the dropdown box?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-02-2010 02:05 AM In reply to

    Re: Rules triggered by Repeating section

    Thanks Jimmy,

    I am looking to populate the dropdown box with a concat(Forename, Surname) field. Failing that, just making it visible and pre-populating it with Client A, Client B and so forth.

  • 11-02-2010 02:16 AM In reply to

    Re: Rules triggered by Repeating section

    I cant understand your problem still. if you are using repeating section and want to concatenate two fields, you can loop through the items using iterator.movenext() and do whatever you want, there is hardly anything that is not possible using Infopath.

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 11-02-2010 09:04 AM In reply to

    Re: Rules triggered by Repeating section

    I suggest adding a FullName node to your repeating group and having its default value set to concat(GivenName, " ", Surname).  Then use this field as the items source for the dropdown box (look in the dropdown box's properties).

    No need for rules or code.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-03-2010 04:34 AM In reply to

    Re: Rules triggered by Repeating section

    Hi Jimmy,

    I've got the conditional formatting to work, and I've added a column to the table for Fullname, however I then place the dropdown box that has the conditional formatting applied, into a different section as planned, and set it datasource to the FullName node. When I enter the first client into the form, a new line appears in the drop down box but with no name in there, when I add a second client their name appears successfully in the dropdown box, but still no sign of the first client. I have the Client section set as a Default field so that it appears when the form is first opened, presumably this means the dropdown box sees it and then populates itself with the blank Fullname field, but I rather thought it would update when the field changes.

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