<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Checkbox Event Within Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/8380.aspx</link><pubDate>Tue, 29 Nov 2005 21:57:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8380</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8380.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8380</wfw:commentRss><description>Glad you got it to work.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Checkbox Event Within Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/8379.aspx</link><pubDate>Tue, 29 Nov 2005 17:40:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8379</guid><dc:creator>Rip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8379.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8379</wfw:commentRss><description>Franck...  I figured out the following solution:&lt;br /&gt;&lt;br /&gt;In the onBeforeChange function change the if statement to&lt;br /&gt;&lt;br /&gt;if (eventObj.Operation == "Insert" &amp;&amp; eventObj.NewValue != null){&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Richard T. Henry&lt;br /&gt;Lewisberry, PA, USA&lt;br /&gt;riphenry@gmail.com</description></item><item><title>Re: Checkbox Event Within Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/8378.aspx</link><pubDate>Tue, 29 Nov 2005 17:20:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8378</guid><dc:creator>Rip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8378</wfw:commentRss><description>I am not sure I understand what values you are talking about here.&lt;br /&gt;&lt;br /&gt;Richard T. Henry&lt;br /&gt;Lewisberry, PA, USA&lt;br /&gt;riphenry@gmail.com</description></item><item><title>Re: Checkbox Event Within Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/8377.aspx</link><pubDate>Tue, 29 Nov 2005 16:38:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8377</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8377.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8377</wfw:commentRss><description>Hi Richard,&lt;br /&gt;&lt;br /&gt;Just a thought here: look into comparing the OldValue and NewValue of your event in your OnBeforeChange.  If you chaged the value, OldValue will be different than NewValue, but on Insert, both may be identical.&lt;br /&gt;Let me know if that works.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché&lt;br /&gt;InfoPathDev</description></item><item><title>Checkbox Event Within Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/5140.aspx</link><pubDate>Tue, 29 Nov 2005 14:24:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5140</guid><dc:creator>Rip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5140.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5140</wfw:commentRss><description>I have a checkbox inside a repeating section.  When the checkbox is checked or unchecked I would like a confirmation box to be displayed.  Based on the result other fields within the repeating section will be populated or cleared.  &lt;br /&gt;&lt;br /&gt;I have everything working with one problem.  The OnBeforeChange event is fired not only when the checkbox is changed but also when a new repeating section is added.  How do I differentiate between a checkbox change and a repeating section insertion?  An code example is shown below.  Thanks for all the assistance.&lt;br /&gt;&lt;br /&gt;function msoxd_my_checkall::OnBeforeChange(eventObj)&lt;br /&gt;{&lt;br /&gt;	// Write your code here&lt;br /&gt;	// Warning: ensure that the constraint you are enforcing is compatible with the default value you set for this XML node.&lt;br /&gt;	if (eventObj.Operation == "Insert"){&lt;br /&gt;	var mychoice = XDocument.UI.Confirm("Update Fields?", 1); &lt;br /&gt;		if (mychoice == 2){&lt;br /&gt;			eventObj.ReturnMessage = "Update Canceled"; &lt;br /&gt;			eventObj.ReturnStatus = false;&lt;br /&gt;		} &lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function msoxd_my_checkall::OnAfterChange(eventObj)&lt;br /&gt;{&lt;br /&gt;// Write code here to restore the global state.&lt;br /&gt;&lt;br /&gt;	if (eventObj.IsUndoRedo)&lt;br /&gt;		{&lt;br /&gt;			// An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;			return;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;// A field change has occurred and the DOM is writable. Write code here to respond to the changes.&lt;br /&gt;if (eventObj.Operation == "Insert"){&lt;br /&gt;	&lt;br /&gt;		var myzero = "0";&lt;br /&gt;		var myblank = ""; &lt;br /&gt;		&lt;br /&gt;		eventObj.Site.selectSingleNode("../my:dataone").removeAttribute("xsi:nil");&lt;br /&gt;eventObj.Site.selectSingleNode("../my:datatwo").removeAttribute("xsi:nil");&lt;br /&gt;	&lt;br /&gt;		if (eventObj.Site.selectSingleNode("../my:checkall").text == "true"){&lt;br /&gt;			//Checkbox Unchecked&lt;br /&gt;				eventObj.Site.selectSingleNode("../my:dataone").text = myzero;&lt;br /&gt;				eventObj.Site.selectSingleNode("../my:datatwo").text = myzero;&lt;br /&gt;				&lt;br /&gt;		}else{&lt;br /&gt;			//Checkbox Unchecked&lt;br /&gt;				eventObj.Site.selectSingleNode("../my:dataone").text = myblank;&lt;br /&gt;				eventObj.Site.selectSingleNode("../my:datatwo").text = myblank;&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Richard T. Henry&lt;br /&gt;Lewisberry, PA, USA&lt;br /&gt;riphenry@gmail.com</description></item></channel></rss>