<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Scripting Table Columns</title>
	<atom:link href="http://forms.stefcameron.com/2006/10/28/scripting-table-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:32:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6099</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Tue, 29 Jun 2010 14:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6099</guid>
		<description>@Todd,

Thanks for letting me know you find my blog useful!

First, you should have a look at my tutorial on &lt;a href=&quot;http://forms.stefcameron.com/2008/08/28/submitting-form-data-by-email/&quot; rel=&quot;nofollow&quot;&gt;submitting form data by email&lt;/a&gt;, if you haven&#039;t done so already.

Regarding reading data from your table, let&#039;s say you have n instances of a repeatable row named &quot;repeatableRow&quot; in a table named &quot;table1&quot; where the repeatable row has a single cell/column where this cell is a text field named &quot;textField1&quot;. You can iterate the rows and get the cell values like this:

&lt;pre&gt;&lt;code&gt;// JavaScript:
var cellValues = &quot;&quot;;
var rows = Table1.repeatableRow.all;
for (var i = 0; i &lt; rows.length; i++)
{
    var row = rows.getItem(i);
    cellValues += row.textField1.rawValue;
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Todd,</p>
<p>Thanks for letting me know you find my blog useful!</p>
<p>First, you should have a look at my tutorial on <a href="http://forms.stefcameron.com/2008/08/28/submitting-form-data-by-email/" rel="nofollow">submitting form data by email</a>, if you haven&#8217;t done so already.</p>
<p>Regarding reading data from your table, let&#8217;s say you have n instances of a repeatable row named &#8220;repeatableRow&#8221; in a table named &#8220;table1&#8243; where the repeatable row has a single cell/column where this cell is a text field named &#8220;textField1&#8243;. You can iterate the rows and get the cell values like this:</p>
<pre><code>// JavaScript:
var cellValues = "";
var rows = Table1.repeatableRow.all;
for (var i = 0; i < rows.length; i++)
{
    var row = rows.getItem(i);
    cellValues += row.textField1.rawValue;
}</code></code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6098</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Thu, 24 Jun 2010 18:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6098</guid>
		<description>Hello Stefan,

I keep coming back to the site to see if I can make something new happen, you are doing a great job helping people out. I have a situation I am trying solve.

I figured out how to make the Add rows and delete button work.

I need for information from the table which includes the added rows, to be populated into the message area of an email based on what is answered with 2 radio buttons. I have a Yes and No button. If they select yes all the information from a table will populate the message area. If they click No only one sentence will go in to the message area. I am using a JavaScript for the email already, in Click, I have other items already being pulled from the form to populate the message area.

I am also wondering about when I use the add rows button. How can I get the added rows information to populate the message area of a email. I set up the table so it has a repeat subfrom with a min count of 1.

LiveCycle Designer ES 8.2 - XP

Can you please help?</description>
		<content:encoded><![CDATA[<p>Hello Stefan,</p>
<p>I keep coming back to the site to see if I can make something new happen, you are doing a great job helping people out. I have a situation I am trying solve.</p>
<p>I figured out how to make the Add rows and delete button work.</p>
<p>I need for information from the table which includes the added rows, to be populated into the message area of an email based on what is answered with 2 radio buttons. I have a Yes and No button. If they select yes all the information from a table will populate the message area. If they click No only one sentence will go in to the message area. I am using a JavaScript for the email already, in Click, I have other items already being pulled from the form to populate the message area.</p>
<p>I am also wondering about when I use the add rows button. How can I get the added rows information to populate the message area of a email. I set up the table so it has a repeat subfrom with a min count of 1.</p>
<p>LiveCycle Designer ES 8.2 &#8211; XP</p>
<p>Can you please help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6097</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 17 Jun 2010 02:16:51 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6097</guid>
		<description>@Lewis,

Check-out my &lt;a href=&quot;http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/&quot; rel=&quot;nofollow&quot;&gt;Expandable Table with Totals&lt;/a&gt; tutorial. It shows you how to create a table that expands. To make sure it can flow onto other pages, make sure the table itself is set to allow content to break across pages (&quot;Object palette &gt; Table &gt; Allow content to break across pages&quot;).

As for the data binding, bind the repeatable row to the repeatable data node that contains the data for the row similar to the way the &quot;Registrant&quot; subform is bound to repeatable &lt;registrant&gt; data in my &lt;a href=&quot;http://forms.stefcameron.com/max2007/&quot; rel=&quot;nofollow&quot;&gt;MAX 2007&lt;/a&gt; tutorial (see the solution form and don&#039;t worry about Guide Builder, you don&#039;t need it to run the form itself).</description>
		<content:encoded><![CDATA[<p>@Lewis,</p>
<p>Check-out my <a href="http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/" rel="nofollow">Expandable Table with Totals</a> tutorial. It shows you how to create a table that expands. To make sure it can flow onto other pages, make sure the table itself is set to allow content to break across pages (&#8220;Object palette > Table > Allow content to break across pages&#8221;).</p>
<p>As for the data binding, bind the repeatable row to the repeatable data node that contains the data for the row similar to the way the &#8220;Registrant&#8221; subform is bound to repeatable &lt;registrant&gt; data in my <a href="http://forms.stefcameron.com/max2007/" rel="nofollow">MAX 2007</a> tutorial (see the solution form and don&#8217;t worry about Guide Builder, you don&#8217;t need it to run the form itself).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lewis</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6096</link>
		<dc:creator>Lewis</dc:creator>
		<pubDate>Fri, 11 Jun 2010 08:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6096</guid>
		<description>Hi Stefan

Great post, found the tables primer particularly useful.

I was wondering, is there a way for this to work with dynamic data.  That is having one row object which repeats based on data from a data connection?

Using what you&#039;ve described above I have created something which does this, but it won&#039;t page down (it just flows off the bottom of the page).  I think it&#039;s because of the &#039;dynamic&#039; column as you can&#039;t tick &#039;allow page breaks&#039; for this one as it&#039;s grayed out.

Any help would be greatly appreciated.

Lewis</description>
		<content:encoded><![CDATA[<p>Hi Stefan</p>
<p>Great post, found the tables primer particularly useful.</p>
<p>I was wondering, is there a way for this to work with dynamic data.  That is having one row object which repeats based on data from a data connection?</p>
<p>Using what you&#8217;ve described above I have created something which does this, but it won&#8217;t page down (it just flows off the bottom of the page).  I think it&#8217;s because of the &#8216;dynamic&#8217; column as you can&#8217;t tick &#8216;allow page breaks&#8217; for this one as it&#8217;s grayed out.</p>
<p>Any help would be greatly appreciated.</p>
<p>Lewis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6095</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 26 Feb 2010 03:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6095</guid>
		<description>Jennifer,

It sounds like you&#039;re trying to call a property (presence) on Subform2 when Subform2 doesn&#039;t exist yet.

If you&#039;re following my advice from my previous reply, then Subform2 is set to be repeatable and has a min occurrence of 0 which means it doesn&#039;t exist by default.

In order to show Subform2, you have to create an instance of it using the addInstance() method of Subform2&#039;s &lt;a href=&quot;http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/&quot; rel=&quot;nofollow&quot;&gt;Instance Manager&lt;/a&gt;:

&lt;pre&gt;&lt;code&gt;_Subform2.addInstance(0);&lt;/code&gt;&lt;/pre&gt;

After that, Subform2 will exist and you can access the fields it contains and get/set properties on it.</description>
		<content:encoded><![CDATA[<p>Jennifer,</p>
<p>It sounds like you&#8217;re trying to call a property (presence) on Subform2 when Subform2 doesn&#8217;t exist yet.</p>
<p>If you&#8217;re following my advice from my previous reply, then Subform2 is set to be repeatable and has a min occurrence of 0 which means it doesn&#8217;t exist by default.</p>
<p>In order to show Subform2, you have to create an instance of it using the addInstance() method of Subform2&#8242;s <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/" rel="nofollow">Instance Manager</a>:</p>
<pre><code>_Subform2.addInstance(0);</code></pre>
<p>After that, Subform2 will exist and you can access the fields it contains and get/set properties on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6094</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Wed, 17 Feb 2010 15:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6094</guid>
		<description>Stefan,
I&#039;ve been working on this off and on and am still having problems.  Would you be able to elaborate a little more?

I have the subform flowable and repeatable (although the min count won&#039;t stay checked). Next I am trying to get a show/hide script to work, but am confused.  I&#039;m sure that I&#039;m missing something simple.  I tried a few different variations to get the script to work and ended up with &quot;Error: accessor &#039;Subform2.presence&#039; is unknown&quot;

The presence of the Subform2 that I want to show when the checkbox in Subform1 is checked is currently set to visible.

Any suggestions?
Thanks!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
I&#8217;ve been working on this off and on and am still having problems.  Would you be able to elaborate a little more?</p>
<p>I have the subform flowable and repeatable (although the min count won&#8217;t stay checked). Next I am trying to get a show/hide script to work, but am confused.  I&#8217;m sure that I&#8217;m missing something simple.  I tried a few different variations to get the script to work and ended up with &#8220;Error: accessor &#8216;Subform2.presence&#8217; is unknown&#8221;</p>
<p>The presence of the Subform2 that I want to show when the checkbox in Subform1 is checked is currently set to visible.</p>
<p>Any suggestions?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6093</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Thu, 11 Feb 2010 14:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6093</guid>
		<description>Stefan,
Ah-ha! That makes sense. Thank you very much!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
Ah-ha! That makes sense. Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6092</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6092</guid>
		<description>Jennifer,

You&#039;re welcome!

It sounds like you might be adding/removing an instance of Table2 rather than showing/hiding it which leads you to attempting to remove it when it has already been removed (&quot;index out of bounds&quot;) or adding a second instance when Table2 isn&#039;t repeatable (&quot;element [max] has violated its allowable number of occurrences&quot;).

Assuming only one customer may fill Table2 even if two customers have checked the &quot;Drink&quot; box, then you should first place Table2 in a flowable subform and make it repeatable with a min number of 0 instances and a max of 1. Then, in your script associated to the checkbox which displays Table2, you should check, before adding an instance, if there is already an instance that exists. You can do this by using the &quot;count&quot; property of Table2&#039;s &lt;a href=&quot;http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/&quot; rel=&quot;nofollow&quot;&gt;Instance Manager&lt;/a&gt; to get the number of existing instances of Table2: _Table2.count.

You would then do the opposite when removing Table2: Check the count to see if it has already been removed (count of 0) and only remove the instance of Table2 if there is an instance currently in existence.</description>
		<content:encoded><![CDATA[<p>Jennifer,</p>
<p>You&#8217;re welcome!</p>
<p>It sounds like you might be adding/removing an instance of Table2 rather than showing/hiding it which leads you to attempting to remove it when it has already been removed (&#8220;index out of bounds&#8221;) or adding a second instance when Table2 isn&#8217;t repeatable (&#8220;element [max] has violated its allowable number of occurrences&#8221;).</p>
<p>Assuming only one customer may fill Table2 even if two customers have checked the &#8220;Drink&#8221; box, then you should first place Table2 in a flowable subform and make it repeatable with a min number of 0 instances and a max of 1. Then, in your script associated to the checkbox which displays Table2, you should check, before adding an instance, if there is already an instance that exists. You can do this by using the &#8220;count&#8221; property of Table2&#8242;s <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/" rel="nofollow">Instance Manager</a> to get the number of existing instances of Table2: _Table2.count.</p>
<p>You would then do the opposite when removing Table2: Check the count to see if it has already been removed (count of 0) and only remove the instance of Table2 if there is an instance currently in existence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6091</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:20:52 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6091</guid>
		<description>Deepak,

I&#039;m afraid I don&#039;t know what &quot;ADLC&quot; stands for.

As far as I know, relocating the subform should result in all contained children to follow along and retain their positions relative to the subform&#039;s top/left corner.

When you say the subform moves to approx. 8in or 9in when you assign &quot;4in&quot; to its y coordinate, could the resulting position appear to be greater than 4in since it would be relative to the subform&#039;s parent which might be 4in from the top of the page?</description>
		<content:encoded><![CDATA[<p>Deepak,</p>
<p>I&#8217;m afraid I don&#8217;t know what &#8220;ADLC&#8221; stands for.</p>
<p>As far as I know, relocating the subform should result in all contained children to follow along and retain their positions relative to the subform&#8217;s top/left corner.</p>
<p>When you say the subform moves to approx. 8in or 9in when you assign &#8220;4in&#8221; to its y coordinate, could the resulting position appear to be greater than 4in since it would be relative to the subform&#8217;s parent which might be 4in from the top of the page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/#comment-6090</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Fri, 29 Jan 2010 18:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-6090</guid>
		<description>Stefan,
First off, thank you for all of your work on this site. I absolutely love it!

I&#039;m not sure if this is the best place to put my question, but it sort of relates.

I have a table with an add row button.  Several of the cells in the table have checkboxes. If one is checked, then a new table pops up for more information regarding that specific item.
Short Example (not specifically what I&#039;m doing, but trying to keep it generic in case this post can help others too):
Column 1 = Customer Name
Column 2 = Drink
If the cell in column 2 is checked, then Table 2 is displayed and it has them select what type of drink they would like, if they want it hot or cold, what size, etc.

The first issue that I am having is that if I add an additional row and both of the users check the checkbox for the drink then I get the error, &quot;Error: The element [max] has violated its allowable number of occurances&quot;.

The next issue I have is that if they change their mind and remove the check from one of the customers, but not the other (I would still want the table to show up since one user needs to reference the table) the table is removed.  Also, if I remove all checks then I get the error, &quot;Error: Index value is out of bounds&quot;.

Any help you could provide would be greatly appreciated! Several people are really excited about this form; I just need to get it working! :)  Thank you!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
First off, thank you for all of your work on this site. I absolutely love it!</p>
<p>I&#8217;m not sure if this is the best place to put my question, but it sort of relates.</p>
<p>I have a table with an add row button.  Several of the cells in the table have checkboxes. If one is checked, then a new table pops up for more information regarding that specific item.<br />
Short Example (not specifically what I&#8217;m doing, but trying to keep it generic in case this post can help others too):<br />
Column 1 = Customer Name<br />
Column 2 = Drink<br />
If the cell in column 2 is checked, then Table 2 is displayed and it has them select what type of drink they would like, if they want it hot or cold, what size, etc.</p>
<p>The first issue that I am having is that if I add an additional row and both of the users check the checkbox for the drink then I get the error, &#8220;Error: The element [max] has violated its allowable number of occurances&#8221;.</p>
<p>The next issue I have is that if they change their mind and remove the check from one of the customers, but not the other (I would still want the table to show up since one user needs to reference the table) the table is removed.  Also, if I remove all checks then I get the error, &#8220;Error: Index value is out of bounds&#8221;.</p>
<p>Any help you could provide would be greatly appreciated! Several people are really excited about this form; I just need to get it working! <img src='http://forms.stefcameron.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Thank you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

