<?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: How do i replace multiple occurrences of a word or stringset in a field?</title><link>https://www.infopathdev.com:443/forums/thread/106222.aspx</link><pubDate>Mon, 18 Apr 2016 14:58:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106222</guid><dc:creator>rayzermatic</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106222.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=106222</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy!&lt;/p&gt;&lt;p&gt;That helps. I will do the&amp;nbsp; &lt;em&gt;Condition: field contains &amp;quot;__&amp;quot;&lt;/em&gt; but add to it, three conditions to trim it hopefully reducing the total possible iterations to error issue. (All my forms run in browser so I only get eight.)&lt;/p&gt;&lt;p&gt;What I&amp;#39;ll do is create three rules on the field.&lt;/p&gt;&lt;p&gt;1. The first will run if the field has four underscores and replace&amp;nbsp;them with one&amp;nbsp;&lt;/p&gt;&lt;p&gt;2. The next one will look&amp;nbsp;for three underscores and replace them with one.&lt;/p&gt;&lt;p&gt;3. And the final will look for&amp;nbsp;two underscores and replace them with one.&lt;/p&gt;&lt;p&gt;Hopefully get them all in a single pass except maybe&amp;nbsp;with #3 having to go one or two more max.&lt;/p&gt;&lt;p&gt;Thanks for your help.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Ray&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How do i replace multiple occurrences of a word or stringset in a field?</title><link>https://www.infopathdev.com:443/forums/thread/106220.aspx</link><pubDate>Mon, 18 Apr 2016 13:57:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106220</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106220.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=106220</wfw:commentRss><description>&lt;p&gt;Hello rayzermatic!&amp;nbsp;&lt;/p&gt;&lt;p&gt;It turns out that this is somewhat difficult to do with InfoPath&amp;#39;s built-in functionality.&lt;/p&gt;&lt;p&gt;One option is to use a recursive approach: put a rule on the field like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp; Condition: field contains &amp;quot;__&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Action: set field to concat(substring-before(field, &amp;quot;__&amp;quot;), &amp;quot;_&amp;quot;, substring-after(field, &amp;quot;__&amp;quot;))&lt;/p&gt;&lt;p&gt;This&amp;nbsp;will repeatedly modify the field until the double underscores are gone,&amp;nbsp;&lt;strong&gt;however&lt;/strong&gt; if this repeats more than the allowed number of rule repetitions (8 in browser forms, 16 in filler forms), the rules will stop executing and the user will see a nasty error.&lt;/p&gt;&lt;p&gt;Another option is to use qRules&amp;#39;&amp;nbsp;ReplaceString command. This is the simplest approach, but requires you to have&amp;nbsp;qRules:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReplaceString /xpath=/path/to/field1 /string1=__ /string2=_&lt;/p&gt;&lt;p&gt;There is one more option that uses an XML secondary data connection and some tricky rules to carry out the operation. It&amp;#39;s a bit time consuming to put together&amp;nbsp;and an example and therefore outside&amp;nbsp;the scope of what we provide for free on this forum, but we can prepare you a sample if you&amp;#39;d be willing to purchase&amp;nbsp;one&amp;nbsp;Qdabra support&amp;nbsp;pack.&amp;nbsp;&lt;/p&gt;</description></item><item><title>How do i replace multiple occurrences of a word or stringset in a field?</title><link>https://www.infopathdev.com:443/forums/thread/106171.aspx</link><pubDate>Thu, 14 Apr 2016 20:21:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106171</guid><dc:creator>rayzermatic</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106171.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=106171</wfw:commentRss><description>&lt;p&gt;What I have done is use translate(&amp;nbsp;field,&amp;quot;` &lt;a href="mailto:~!@#$%^&amp;amp;*()=+\/][}{;:"&gt;~!@#$%^&amp;amp;*()=+\/][}{;:?&amp;gt;&amp;lt;,.&amp;#39;&lt;/a&gt;&amp;quot;,&amp;quot;____________________________________&amp;quot;) to change special characters into underscores. &lt;/p&gt;&lt;p&gt;However, sometimes I end up with several occurrences of double underscores in the field. &lt;/p&gt;&lt;p&gt;I want to remove the double underscores(&amp;quot;__&amp;quot;) and replace all of them with a single underscore.&lt;/p&gt;&lt;p&gt;I have used concat(substring-before(field,&amp;quot;__&amp;quot;),&amp;quot;_&amp;quot;,string-after(field,&amp;quot;__&amp;quot;)) and it will remove the first occurrence.&lt;/p&gt;&lt;p&gt;What I need is something like the double eval or something to loop through the whole line and get them all.&lt;/p&gt;&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>