Default Value in Repeating Section - First Item Only - InfoPath Dev
in

InfoPath Dev

Maintenance notice: We may have service interruptions tonight, 5/22/2017, between 8 & 9 pm PST.

Office365 Alert - Sandbox has been deprecated in SharePoint Online.
Read more here.

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Default Value in Repeating Section - First Item Only

Last post 09-09-2010 07:45 PM by cbrown00. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-08-2010 07:14 PM

    Default Value in Repeating Section - First Item Only

    I have a single text box in a repeating section.  The text box will hold a person's name.  I would like the initial item in the repeating section to calculate with the entry in another text box, and for subsequent instances of the repeating section to be blank.  Currently, the value field of the text box in the repeating section has only the node listed.  The name comes through, but also shows up on subsequent instances to the repeating section.  How can I limit it so the name only shows up on the first instance?  I'm guessing it can be done with a rule that references the current count of the repeating section, and inserts a field at the beginning count only, but I don't know how to configure the rule.

     

    Filed under: ,
  • 09-09-2010 02:11 AM In reply to

    Re: Default Value in Repeating Section - First Item Only

    Have a look at the default value on my:field2 in the attached template.  Even if additional rows are added at the beginning of the table, the value remains in the first row.  You can replace the "Hello" with the expression for the name value you want to use, and replace my:group2 with the name of your repeating node.

     You might also consider having the name value in a non-repeating field, and showing it only in the first row of your repeating section.  This would make more sense from an XML data perspective, as you wouldn't wind up with empty, needless fields.  The template I'm attaching shows how to do this as well.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-09-2010 07:45 PM In reply to

    Re: Default Value in Repeating Section - First Item Only

    Jimmy..worked perfectly.  Thank you!!!

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