<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119171.aspx</link><pubDate>Fri, 01 Jun 2018 20:27:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119171</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119171.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119171</wfw:commentRss><description>Perfect!
Thanks Hilary. Your help is invaluable!!</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119170.aspx</link><pubDate>Fri, 01 Jun 2018 19:16:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119170</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119170.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119170</wfw:commentRss><description>Ok - the form2 sample I posted probably does what you need in those cases, right? Except for the edge case bug where the decimal is &amp;gt;= .95, in which case instead of changing from 21.95 to 22.00, it changes to 21.10? Because if I enter 20.8442, I get 20.80 in that form sample. Here&amp;#39;s a copy with the &amp;gt;= .95 bug fixed.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119169.aspx</link><pubDate>Fri, 01 Jun 2018 19:06:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119169</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119169.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119169</wfw:commentRss><description>Ok. I can see where I got unclear. My apologies.

It&amp;#39;s true that I want it to display with two decimals. And it&amp;#39;s also true that what I have works to do that. 
What I still need is for the final price to be rounded to the nearest 100th, I believe. 
So when I said I needed 21.9279 to turn into 21.90, I was saying I wanted a number to round to the nearest 0 or 5. 
Another example would be 20.8442 turning into 20.80. 
I hope I didn&amp;#39;t further confuse.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119167.aspx</link><pubDate>Fri, 01 Jun 2018 18:46:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119167</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119167.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119167</wfw:commentRss><description>Here&amp;#39;s what you said in your initial post: &amp;quot;... it calculates to 21.9279 I need that to turn into $21.90&amp;quot; - if all you really want is to display with two decimals, the formatting you said you have set up should already do that. I&amp;#39;m obviously not understanding what you are trying to do. Attaching a file with a text box w/ formatting set, just in case that&amp;#39;s where the confusion is.... feel free to attach your form under the options tab if that might help me understand the issue.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119166.aspx</link><pubDate>Fri, 01 Jun 2018 17:50:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119166</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119166.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119166</wfw:commentRss><description>Thank you, but I think IP is doing the math incorrectly. 
Wouldn&amp;#39;t 25.972 equal 25.97? Instead, the form is setting the number to 25.10.
Would you happen to know how I would set up the math?</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119146.aspx</link><pubDate>Thu, 31 May 2018 16:30:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119146</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119146.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119146</wfw:commentRss><description>Here&amp;#39;s a sample that may help - save locally, right click &amp;amp; select design. You&amp;#39;ll see in my sample, I&amp;#39;m not using a calculated default, but I think this approach will still work w/a calc&amp;#39;d default since the conditions should prevent any rule looping from resetting the field w/ the rules on it.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119140.aspx</link><pubDate>Thu, 31 May 2018 15:08:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119140</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119140.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119140</wfw:commentRss><description>I&amp;#39;m a math dunce and didn&amp;#39;t realize that you wanted the last decimal to round, and thought the issue was just related to displaying only two decimal points! I&amp;#39;ll see if I can figure out a way to do this later today, I&amp;#39;m guessing we can use substring functions....</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119138.aspx</link><pubDate>Thu, 31 May 2018 13:11:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119138</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119138.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119138</wfw:commentRss><description>I&amp;#39;m displaying it in a text box. The format is currency and 2 decimals.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119132.aspx</link><pubDate>Wed, 30 May 2018 21:04:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119132</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119132.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119132</wfw:commentRss><description>Wonderful! Is the data type of the field decimal? Are you displaying the data in a text box or in a calculated value?</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119131.aspx</link><pubDate>Wed, 30 May 2018 20:51:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119131</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119131.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119131</wfw:commentRss><description>I just need to display it that way in the form. 
So I guess if there&amp;#39;s another route I can take, I&amp;#39;ll take it.</description></item><item><title>Re: How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119124.aspx</link><pubDate>Wed, 30 May 2018 17:15:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119124</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119124.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119124</wfw:commentRss><description>Do you actually need to round this? Or can you just display as the nearest 100th in the form?</description></item><item><title>How to round to the nearest 100th? (i'm not sure)</title><link>https://www.infopathdev.com:443/forums/thread/119119.aspx</link><pubDate>Wed, 30 May 2018 14:08:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119119</guid><dc:creator>ttrotman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119119.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=119119</wfw:commentRss><description>Hey all, 

I&amp;#39;m trying to do some math in my form that allows me to calculate money. I&amp;#39;m actually calculating PayPal&amp;#39;s fees. It&amp;#39;s 2.99% per charge, plus $.30. 
I do that like this:
sum(MealTotal) * 2.99 / 100 + .30
So for $21.00, it calculates to 21.9279

I need that to turn into $21.90. 
So I tried this:
round(sum(MealTotal) * 2.99 / 100 + .30 + MealTotal * 100) / 100
Which returned this: $21.01

Can anyone tell me that right code to input into the form? 
Thanks in advance.</description></item></channel></rss>