<?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: Compare main field to any repeating secondary field</title><link>https://www.infopathdev.com:443/forums/thread/47945.aspx</link><pubDate>Fri, 16 Oct 2009 03:38:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47945</guid><dc:creator>Daniels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47945.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=47945</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;Function now available in both JScript and VBScript&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The example loops through the repeating &amp;quot;Field&amp;quot; elements inside the &amp;quot;Batch&amp;quot; and &amp;quot;Method&amp;quot; nodes of a CAML template. When the required &amp;quot;Field&amp;quot; node is found by matching the &amp;quot;name&amp;quot; attribute, the value of the node is set to the value of a field in the form&amp;#39;s main data source (set by the user).&lt;br /&gt;&lt;br /&gt;Event handlers configured on form controls call the function provided to find and update the corresponding node in the Secondary Data Source with the required value after user makes a change to the value of the form control/field.&lt;br /&gt;&lt;br /&gt;The function is available in both JScript and VBScript.&lt;br /&gt;&lt;br /&gt;View the article: &lt;a class="" href="http://blog-sharepoint.blogspot.com/2009/07/infopath-update-repeating-elementsnodes.html"&gt;&lt;font color="#666666"&gt;InfoPath JScript, VBScript - Update Repeating Elements/Nodes in a Secondary Data Source&lt;/font&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An explanation of how to implement the function&amp;nbsp;in&amp;nbsp;an InfoPath&amp;nbsp;Form:&amp;nbsp;&lt;a class="postlink" href="http://www.code-tips.com/2009/09/infopath-code-loop-through-items-in.html"&gt;InfoPath Code - Loop through data source - JScript, VBScript&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Compare main field to any repeating secondary field</title><link>https://www.infopathdev.com:443/forums/thread/47041.aspx</link><pubDate>Wed, 16 Sep 2009 06:09:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47041</guid><dc:creator>Daniels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47041.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=47041</wfw:commentRss><description>&lt;p&gt;The article &lt;a href="http://blog-sharepoint.blogspot.com/2009/07/infopath-update-repeating-elementsnodes.html"&gt;InfoPath - Update Repeating Elements/Nodes in a Secondary Data Source&lt;/a&gt;&amp;nbsp; provides&amp;nbsp;instructions and a JScript example (code included) to loop through repeating nodes in a secondary datasource.&amp;nbsp; The function takes the value of the an attribute (name) in the repeating node, and the XPath to the field in the Main Data Source which contains the required value.&lt;/p&gt;
&lt;p&gt;The function loops through each node in the repeating element, testing if the value the &amp;quot;name&amp;quot; attribute for each node matched the required value.&amp;nbsp; If the required node is found, the value of he node is then set to the value from the field in the main data source.&lt;/p&gt;
&lt;p&gt;This function can also be used to compare values in a repeating element from the main or secondary datasources, if the final part of the function which sets the required value is ignored.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7197.aspx</link><pubDate>Thu, 28 Jul 2005 22:40:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7197</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7197.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7197</wfw:commentRss><description>[Main-q:username] is not equal to [Secondary-d:username], display "wrong" in a dialog box.&lt;br /&gt; is my second condition, that is the reason it is giving you "wrong" message. [Main-q:username] is not equal to atleat one [Secondary-d:username] so the condition is returning true as output, so your first rule executes.&lt;br /&gt;&lt;br /&gt;When you are creating the rule, check whether you have checked the checkbox to "stop processing rules after this rule finishes". If this checkbox is checked then the rule that follows does not execute. &lt;br /&gt;&lt;br /&gt;If you dint get above thing, just make your second rule to be the first one and check the result.&lt;br /&gt;&lt;br /&gt;Hope you understood this!&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7196.aspx</link><pubDate>Thu, 28 Jul 2005 20:48:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7196</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7196.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7196</wfw:commentRss><description>Hopefully we're both missing something simple here...&lt;br /&gt;&lt;br /&gt;I have an Access table, [Users], that has the following fields:&lt;br /&gt;[kingID]&lt;br /&gt;[username]&lt;br /&gt;[passsword]&lt;br /&gt;&lt;br /&gt;I have created both a main and a secondary data connection to the table [Users].  In my form, I placed the field, [q:username] from the main datasource.  I also placed the field [d:username] from the secondary datasource.  I have a button that has the following rule:&lt;br /&gt;&lt;br /&gt;[Main-q:username] is not equal to [Secondary-d:username], display "wrong" in a dialog box.&lt;br /&gt;&lt;br /&gt;There is also a second rule that says:&lt;br /&gt;&lt;br /&gt;[Main-q:username] is equal to [Secondary-d:username], display "right" in a dialog box.&lt;br /&gt;&lt;br /&gt;When I preview the form and click the button, I get a dialog box that says "wrong" no matter what I put in the [Main-q:username] field, whether the name matches one of the records or not.  I never get a dialog box that says "right".&lt;br /&gt;&lt;br /&gt;Now according to your above post, if I enter a username in [main-q:username] that matches any returned record in [secondary-d:username], the second rule should suceed.  The problem is that I don't get the results that you posted.</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7195.aspx</link><pubDate>Thu, 28 Jul 2005 17:35:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7195</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7195.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7195</wfw:commentRss><description>Let me try to explain you again,&lt;br /&gt;&lt;br /&gt;1. If your conditon is &lt;br /&gt;maindatasourceField1 = socondarydatasourceField2 &lt;br /&gt;&lt;br /&gt;In the above condition if maindatasourceField1 is equal to any one occurence of socondarydatasourceField2 then the output will be true.&lt;br /&gt;&lt;br /&gt;2. If your conditon is &lt;br /&gt;maindatasourceField1 != socondarydatasourceField2 &lt;br /&gt;&lt;br /&gt;This is apposite of the above condition, if maindatasourceField1 is equal to all occurences of socondarydatasourceField2 then you will have an output of false.&lt;br /&gt;If it is not equal to atleast one occurence of socondarydatasourceField2 then the output will be true.&lt;br /&gt;&lt;br /&gt;3. Third condition can be&lt;br /&gt;not(maindatasourceField1 = socondarydatasourceField2)&lt;br /&gt;&lt;br /&gt;This will give you an output of true if your maindatasourceField1 is not equal to atleast one occurence of socondarydatasourceField2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7194.aspx</link><pubDate>Thu, 28 Jul 2005 12:05:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7194</guid><dc:creator>smaur</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7194</wfw:commentRss><description>I experienced the same scenario. I think that all it takes is for one secondary data occurance to be unequal to the main source data for the test to fail.</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7193.aspx</link><pubDate>Thu, 28 Jul 2005 02:07:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7193</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7193.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7193</wfw:commentRss><description>Well Agni, I hope and pray that I am just missing something, but for some reason, everytime I set up the above scenario, the rule fails, thereby incorrectly compairing the main datasource field to any occurance of the field in the secondary datasource table.  Any ideas???&lt;br /&gt;&lt;br /&gt;BTW, when I compare the main datasource field, value="1", to a field in the secondary datasource that has the same value for each record, in this case "1", the rule succeeds.</description></item><item><title>Re: Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/7192.aspx</link><pubDate>Fri, 15 Jul 2005 06:34:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7192</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7192</wfw:commentRss><description>Yes you can do this,&lt;br /&gt;When you compare a non repeating field with a repeating table field, InfoPath by default compares with all of the rows in the table. You dont need to write anything specific for that, its just regular condition.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Compare main field to any repeating secondary fiel</title><link>https://www.infopathdev.com:443/forums/thread/4784.aspx</link><pubDate>Fri, 15 Jul 2005 03:06:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4784</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4784.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4784</wfw:commentRss><description>Hey all,&lt;br /&gt;&lt;br /&gt;Is there a way to compare a field from the main data source to any occurence of a field in a repeating table bound to a secondary source?  An example would be to set up a rule that says, if mainfield1 does not match "any occurence of" secondaryfield1, display "wrong"?</description></item></channel></rss>