<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stefan Cameron on Forms &#187; Data-Nominated Subforms</title>
	<atom:link href="http://forms.stefcameron.com/category/data-nominated-subforms/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Wed, 16 Feb 2011 22:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Data-Nominated Subforms</title>
		<link>http://forms.stefcameron.com/2006/05/10/data-nominated-subforms/</link>
		<comments>http://forms.stefcameron.com/2006/05/10/data-nominated-subforms/#comments</comments>
		<pubDate>Thu, 11 May 2006 00:21:23 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Data-Nominated Subforms]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=9</guid>
		<description><![CDATA[I thought I would post a little sample on data-nominated subforms tonight. This is a new feature, introduced in Designer 7.1, which can be a very powerful tool. Since the feature essentially lets you define expressions against values from data being loaded into a form in order to control which subform, from a specified set [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I would post a little sample on data-nominated subforms tonight. This is a new feature, introduced in Designer 7.1, which can be a very powerful tool.</p>
<p>Since the feature essentially lets you define expressions against values from data being loaded into a form in order to control which subform, from a specified set (subform set containing subforms), will be used for the record currently being loaded into the form, you can do very interesting things. For example, you might have a table which lists data. Maybe you would like to use a row which has a yellow background to identify data which is not important, one with an orange background for data that&#8217;s important and one with a red background for data that&#8217;s very important. This can be easily achieved using Data-Nominated Subforms.</p>
<p>I&#8217;ve created a little sample based on the movie data I used for the <a href="http://forms.stefcameron.com/2006/05/06/conditional-breaks/">Conditional Breaks Sample</a> I posted a few days ago. In this sample, I have a subform set which contains 3 subforms, each capable of binding to a movie record. The twist is that I want to use the green subform for comedies, the red one for action movies and the blue one for dramas.</p>
<p><a href="http://forms.stefcameron.com/samples/DataNominatedSubforms.zip">Download Sample [zip]</a></p>
<p><strong>Minimum Requirements:</strong> Designer 7.1, Acrobat Pro 7.0.5.</p>
<p><strong>Note:</strong> A basic understanding of Data Binding is required for this sample.</p>
<p>The trick in getting this to work is to first create a data connection which represents the data you&#8217;re loading into the form.</p>
<p>Then you need to create the subforms which each contain fields with names set to the data node names from a movie record so that <em>Normal</em> (&#8220;implicit&#8221;) binding works correctly once the subform is picked for the record.</p>
<p>The next step is to wrap all subforms into a subform set. You can do this by selecting them all in the Hierarchy palette and then choosing <em>Wrap in Subform Set</em> from the context menu.</p>
<p>At this point you&#8217;re almost done. All that&#8217;s missing are the expressions which tell the Object Model which subform from within the subform set to use for a particular data record.</p>
<p>The Data-Nominated Subform feature is accessed by selecting the subform set and going to the Object palette&#8217;s Subform Set tab. There, you&#8217;ll find a Type property from which you can select the <em>Select One Subform From Alternatives</em> item. When you select this option, an <em>Edit Alternatives</em> button will appear. Click on that to open the Data-Nominated Subform dialog. In there, you would elect to <em>Choose Subform Using Expression</em>, select your data connection from the drop down list and then specify an expression like</p>
<pre><code>category == &quot;Comedy&quot;</code></pre>
<p>for the &#8220;$record.movie&#8221; binding (which establishes the scope for your expression) on the comedy subform.</p>
<p>When you preview the form (if you just run it in Acrobat, you&#8217;ll have to import the data into the form using the commands under the File menu), you&#8217;ll see that the comedy subform is used only for records which have a &#8220;Comedy&#8221; category name.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2006/05/10/data-nominated-subforms/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

