<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Field Validation Doesn't Re-Validate after a change in the data</title><link>https://www.infopathdev.com:443/forums/thread/96569.aspx</link><pubDate>Fri, 21 Mar 2014 13:17:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:96569</guid><dc:creator>JeffVojtko</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/96569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=96569</wfw:commentRss><description>&lt;p&gt;Wow! That was tough. I found an article online that talked about a possible way to build an If-Else..Then statement in InfoPath. The article spoke about using a Concat statement. My issue was that the rules above only set the Error/Good field on the very first attempt. I had to create a rule that ran on Field Change. So, I created an Action step and left the Condition blank and put in some variation of the following statement to get my field conditions to return the correct value:&lt;/p&gt;&lt;p&gt;concat(substring(&amp;quot;Error&amp;quot;, 1, (not(starts-with(., &amp;quot;P&amp;quot;)) and not(starts-with(., &amp;quot;A&amp;quot;)) and not(starts-with(., &amp;quot;Q&amp;quot;)) and not(starts-with(., &amp;quot;R&amp;quot;)) and not(starts-with(., &amp;quot;U&amp;quot;)) and not(starts-with(., &amp;quot;T&amp;quot;)) or substring(., 2, 4) != SystemCode or substring(., 6, 3) != &amp;quot;SPM&amp;quot; or substring(., 9, 1) != &amp;quot;.&amp;quot; or substring(., 17, 1) != &amp;quot;S&amp;quot; or not(xdUtil:Match(string(substring(., 14, 3)), &amp;quot;\d\d\d&amp;quot;))) * string-length(&amp;quot;Error&amp;quot;)), substring(&amp;quot;Good&amp;quot;, 1, ((starts-with(., &amp;quot;P&amp;quot;)) and (starts-with(., &amp;quot;A&amp;quot;)) and (starts-with(., &amp;quot;Q&amp;quot;)) and (starts-with(., &amp;quot;R&amp;quot;)) and (starts-with(., &amp;quot;U&amp;quot;)) and (starts-with(., &amp;quot;T&amp;quot;)) and substring(., 2, 4) = SystemCode and substring(., 6, 3) = &amp;quot;SPM&amp;quot; and substring(., 9, 1) = &amp;quot;.&amp;quot; and substring(., 17, 1) = &amp;quot;S&amp;quot; and (xdUtil:Match(string(substring(., 14, 3)), &amp;quot;\d\d\d&amp;quot;))) * string-length(&amp;quot;Good&amp;quot;))) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Field Validation Doesn't Re-Validate after a change in the data</title><link>https://www.infopathdev.com:443/forums/thread/96523.aspx</link><pubDate>Wed, 19 Mar 2014 14:32:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:96523</guid><dc:creator>JeffVojtko</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/96523.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=96523</wfw:commentRss><description>&lt;p&gt;I am running across an issue; I have a textbox field where I validate the content and set another field to either &amp;quot;Good&amp;quot; or &amp;quot;Error&amp;quot; and then show the&lt;br /&gt;error on the initial field. But, this only works on the initial validation. (First time through) The rules don&amp;#39;t seem to work after the first time through. I need&lt;br /&gt;the validation rules to fire whenever a data element is changed in this initial field. Any help would be greatly appreciated.&lt;br /&gt;&lt;br /&gt;Here are the rules:&lt;/p&gt;&lt;p&gt;Good rules:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1) starts-with(., &amp;quot;P&amp;quot;) or starts-with(., &amp;quot;A&amp;quot;)&lt;br /&gt;2) substring(., 2, 4) = ../../../my:SystemCode&lt;br /&gt;3) substring(., 6, 3) = &amp;quot;SPM&amp;quot;&lt;br /&gt;4) substring(., 9, 1) = &amp;quot;.&amp;quot;&lt;br /&gt;5) substring(., 17, 1) = &amp;quot;S&amp;quot;&lt;br /&gt;6) xdUtil:Match(string(substring(., 14, 3)), &amp;quot;\d\d\d&amp;quot;)&lt;/p&gt;&lt;p&gt;Error rules:&lt;/p&gt;&lt;p&gt;1) not(starts-with(., &amp;quot;P&amp;quot;)) or not(starts-with(., &amp;quot;A&amp;quot;))&lt;br /&gt;2) substring(., 2, 4) != ../../../my:SystemCode&lt;br /&gt;3) substring(., 6, 3) != &amp;quot;SPM&amp;quot;&lt;br /&gt;4) substring(., 9, 1) != &amp;quot;.&amp;quot;&lt;br /&gt;5) substring(., 17, 1) != &amp;quot;S&amp;quot;&lt;br /&gt;6) not(xdUtil:Match(string(substring(., 14, 3)), &amp;quot;\d\d\d&amp;quot;))&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>