Insert's new /firstparentonly parameter - Jimmy Rishe
in

InfoPath Dev

Jimmy Rishe

Insert's new /firstparentonly parameter

In qRules 3.4, we've added a new parameter to the Insert command that is intended to allow it to be more consistent with how people are expecting it to work.

Suppose you have data source with nested repeating groups, like this:

You lay them out on the form with nested repeating sections, preview the form and add a few of the parent sections, which gives you this layout:

Then you run the following qRules command:

Insert /parent=/my:myParentChildForm/my:Parents/my:Parent/my:Children /child=my:Child /count=3

A lot of people would expect this to add three Child groups to every one of the Parent groups, but this is not the case.  Instead, qRules only adds three Child groups to the first Parent group, and leaves the rest alone.

In order to achieve the behavior that people are expecting, we've added the /firstparentonly parameter.  In order to maintain backwards compatibility with earlier versions, this parameter is treated as true when it's unspecified.  When it's specifically specified as false, qRules will insert groups into all of the locations that match the /parent XPath

Insert /parent=/my:myParentChildForm/my:Parents/my:Parent/my:Children /child=my:Child /firstparentonly=false /count=3

Enjoy!

Comments

No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.