<?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 to set a number format for a InfoPath form (when setting fields using rules)</title><link>https://www.infopathdev.com:443/forums/thread/92128.aspx</link><pubDate>Mon, 12 Aug 2013 07:36:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92128</guid><dc:creator>Trevor Arter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92128.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=92128</wfw:commentRss><description>&lt;p&gt;Solved it using&lt;/p&gt;
&lt;p&gt;&amp;nbsp;number(xdXDocument:GetDOM(&amp;quot;FormConfig&amp;quot;)/dfs:myFields/dfs:dataFields/dfs:FormConfig/@FieldValue[../@FieldName = &amp;quot;UpgradeFactor&amp;quot;]) div 100&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;(It was in the InfoPath 2007 client, using a button click to query a SharePoint list)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you know&amp;nbsp;where I can find a good description of the syntax of these xPath functions for&amp;nbsp;use in rules?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Trevor&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to set a number format for a InfoPath form (when setting fields using rules)</title><link>https://www.infopathdev.com:443/forums/thread/92084.aspx</link><pubDate>Sun, 11 Aug 2013 05:57:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92084</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92084.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=92084</wfw:commentRss><description>&lt;p&gt;Is this happening in a browser form or within the InfoPath filler? What are you using to query the data from SharePoint?&lt;/p&gt;&lt;p&gt;I suspect what may be happening is that SharePoint may be returning region-formatted data (e.g. 0,25) and that you are getting the validation error when the 0,25 value is set to the field, because it is not a valid XML number.&lt;/p&gt;&lt;p&gt;One way to check this is to display the value in an Expression Box with the formatting set to None.&lt;/p&gt;&lt;p&gt;If the number will always be between 0 and 1 (i.e. won&amp;#39;t have any thousands separators), one thing you can do is use translate() to convert the commas to periods:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;translate(xdXDocument:GetDOM(&amp;quot;FormConfig&amp;quot;)/dfs:myFields/dfs:dataFields/dfs:FormConfig/@FieldValue[../@FieldName = &amp;quot;UpgradeFactor&amp;quot;], &amp;quot;,&amp;quot;, &amp;quot;.&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Could you give that a try?&lt;/p&gt;&lt;p&gt;Incidentally, &lt;strong&gt;25 div 100&lt;/strong&gt; should work, but you need to put spaces between the numbers and the &lt;strong&gt;div&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>How to set a number format for a InfoPath form (when setting fields using rules)</title><link>https://www.infopathdev.com:443/forums/thread/92019.aspx</link><pubDate>Thu, 08 Aug 2013 14:45:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92019</guid><dc:creator>Trevor Arter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92019.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=92019</wfw:commentRss><description>&lt;p&gt;Hi Experts &lt;/p&gt;
&lt;p&gt;I have an an InfoPath 2007 form (submitting to SharePoint 2007) which needs to work in an international environment where some PC&amp;#39;s have European regional settings, and some have US/UK settings.&lt;/p&gt;
&lt;p&gt;I have a button which when clicked sets a field&amp;#39;s value to a value called UpgradeFactor which is fetched from a secondary data source (configuration list on the same SharePoint site)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;xPath for the rule:&lt;/p&gt;
&lt;p&gt;(set a&amp;nbsp;fields value to...)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;xdXDocument:GetDOM(&amp;quot;FormConfig&amp;quot;)/dfs:myFields/dfs:dataFields/dfs:FormConfig/@FieldValue[../@FieldName = &amp;quot;UpgradeFactor&amp;quot;]&lt;/p&gt;
&lt;p&gt;UpgradeFactor is a decimal value between 0 and 1, currently set to&amp;nbsp;&amp;quot;0.25&amp;quot;&amp;nbsp;and the field which receives it is has type Decimal (Double)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This works fine on a PC with US or UK regional settings, but on a European one I get a validation error because of wrong data format (expecting &amp;quot;0,25&amp;quot;).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;How can I make the form always work with US number format?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve already set the SharePoint site to US regional settings. I&amp;#39;ve added a culture to the form code which&amp;nbsp;works fine for&amp;nbsp;the code but doesn&amp;#39;t seem&amp;nbsp;to affect rules or the rest of the form:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;CultureInfo&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; culture = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;CultureInfo&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;en-GB&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I&amp;#39;ve also tried setting the value to 25 and modifying the xPath with something like &amp;quot;25div100&amp;quot; but that didn&amp;#39;t seem to work either.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Can anybody help?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;
&lt;p&gt;Trevor&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>