Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Infopath
|
Infopath Programming and automation discussions only please. :)
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Infopath section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2007, 07:29 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Default Rows Based Upon Number of XML Attributes.

Greetings everyone,

Based upon the number of attributes in an XML, I want to add a corresponding number of default rows to a repeating section within infopath. For example in this case there are 4 parameters under "Part_3". In this case I would want there to be 4 rows as a default but if I chose another, say with only 2 parameters, I would want the rows to default to 2. A clip of the XML follows:

<Module Name="Part_3">
-<Collection Name="Input">
-<Parameter Name="Parameter_1" Type="Boolean" Default="false">
 <Value>true</Value>
 <Value>false</Value>
 </Parameter>
-<Parameter Name="Parameter_2" Type="String" Default="None">
 <Value>None</Value>
 <Value>Left</Value>
 <Value>Right</Value>
 <Value>Both</Value>
 </Parameter>
-<Parameter Name="Parameter_3" Type="String" Default="None">
 <Value>Left</Value>
 <Value>Right</Value>
 <Value>None</Value>
 </Parameter>
-<Parameter Name="Parameter_4" Type="Boolean" Default="false">
 <Value>true</Value>
 <Value>false</Value>
 </Parameter>
 </Collection>

I can use XPath to dial down to particular values within this file but I need the rows to automatically default to the required number.

I'm using InfoPath 2003. Would anyone be able to help with this? Thanks in advance.











Similar Threads
Thread Thread Starter Forum Replies Last Post
can I filter rows based on this type of constraint callagga SQL Language 2 August 21st, 2008 04:31 PM
need html attribute based on xml attributes charles95621 XSLT 1 May 24th, 2007 05:21 PM
Default attributes from DTD while transformation nmahesh567 XSLT 5 March 28th, 2007 03:31 AM
Grouping based on attributes values Chamkaur XSLT 4 June 21st, 2006 05:51 AM
select rows based on a criteria and paste ashu_gupta75 Excel VBA 2 July 30th, 2004 01:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.