<?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: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69406.aspx</link><pubDate>Thu, 18 Aug 2011 16:42:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69406</guid><dc:creator>kcark1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69406.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69406</wfw:commentRss><description>That makes perfect sense now.&amp;nbsp; thanks for the explanation.</description></item><item><title>Re: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69391.aspx</link><pubDate>Thu, 18 Aug 2011 04:13:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69391</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69391.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69391</wfw:commentRss><description>&lt;p&gt;Within a mathematical expression, a Boolean expression (i.e. &lt;strong&gt;&lt;em&gt;(ServiceType = &amp;quot;Service Payment&amp;quot;)&lt;/em&gt;&lt;/strong&gt;) is treated as a 1 when it is true and 0 when it is false.&amp;nbsp; So when ServiceType has the value &amp;quot;Service Payment&amp;quot;, the &lt;strong&gt;&lt;em&gt;(1 - 2 * (ServiceType = &amp;quot;Service Payment&amp;quot;))&lt;/em&gt;&lt;/strong&gt; part evaluates to (1 - 2 * 1) -&amp;gt; (1 - 2) -&amp;gt; &lt;strong&gt;&lt;em&gt;-1&lt;/em&gt;&lt;/strong&gt;.&amp;nbsp; When ServiceType has another value, it evaluates to (1 - 2 * 0) -&amp;gt; (1 - 0) -&amp;gt; &lt;strong&gt;&lt;em&gt;1&lt;/em&gt;&lt;/strong&gt;.&amp;nbsp; Nothin&amp;#39; to it! :-)&lt;/p&gt;</description></item><item><title>Re: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69375.aspx</link><pubDate>Wed, 17 Aug 2011 17:05:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69375</guid><dc:creator>kcark1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69375</wfw:commentRss><description>&lt;p&gt;Thank you very much!&amp;nbsp; Worked like a champ.&amp;nbsp; Now since this is way beyond my basic understanding, why does it work?&amp;nbsp; What does the 1 - 2 do to make it work?&lt;/p&gt;&lt;p&gt;Thanks again.&lt;/p&gt;</description></item><item><title>Re: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69370.aspx</link><pubDate>Wed, 17 Aug 2011 14:56:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69370</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69370.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69370</wfw:commentRss><description>&lt;p&gt;One thing that should work is to remove that rule and change the default value formula to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(NoUnitsProvided * ServiceRate) * (1 - 2 * (ServiceType = &amp;quot;Service Payment&amp;quot;))&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This will switch the value to negative when ServiceType is equal to Service Payment.&lt;/p&gt;</description></item><item><title>Re: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69364.aspx</link><pubDate>Wed, 17 Aug 2011 13:58:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69364</guid><dc:creator>kcark1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69364.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69364</wfw:commentRss><description>&lt;p&gt;Thanks for the reply.&amp;nbsp; There is no external data source, the forms operates stand-alone just for the purposes of having an electronic form.&amp;nbsp; The default field value&amp;nbsp;field &amp;quot;AmountDue&amp;quot; is &amp;quot;NoUnitsProvided&amp;quot; * &amp;quot;ServiceRate&amp;quot;.&amp;nbsp; All fields relavent to the default value are found in a repeating table.&amp;nbsp; The repeating table has a total of 12 fields in it, 3 of which (&amp;quot;ServiceType&amp;quot;, &amp;quot;NoUnitsProvided&amp;quot;, and &amp;quot;ServiceRate&amp;quot;) have a relation to the &amp;quot;AmountDue&amp;quot; field.&amp;nbsp;&amp;nbsp;The &amp;quot;ServiceType&amp;quot; field is a&amp;nbsp;&amp;nbsp;List Box with 5 possible selection, Basic, Minimal, Moderate, Intensive, and Service Payment.&lt;/p&gt;&lt;p&gt;The premise I have used in defining the form is that the end-user will select a ServiceType, enter the &amp;quot;NoUnitsProvided&amp;quot; and the &amp;quot;ServiceRate&amp;quot;.&amp;nbsp; The &amp;quot;AmountDue&amp;quot; field calculates &amp;quot;NoUnitsProvided&amp;quot; * &amp;quot;ServiceRate&amp;quot;.&amp;nbsp; Again, this is the default value for the &amp;quot;Amount Due&amp;quot; field.&amp;nbsp; If the end-user selects a &amp;quot;ServiceType&amp;quot; of Service Payment, I have created a Rule the sets a condition of ServiceType = &amp;quot;Service Payment&amp;quot; and an Action of Set a field&amp;#39;s value: . = (NoUnitsProvided * ServiceRate) * -1.&lt;/p&gt;&lt;p&gt;This is where my issue begins.&amp;nbsp; When I complete the initial entry to the form, the calculations work fine and display properly.&amp;nbsp; After I save the form using file save as giving the form a unique name such as test13 and then open the form test13 to continue editing, the line items that were listed as &amp;quot;Service Payment&amp;quot; have now reverted to the default calculation of &amp;quot;NoUnitsProvided&amp;quot; * &amp;quot;ServiceRate&amp;quot; and do not consider the Rule.&lt;/p&gt;&lt;p&gt;I know that this is a long winded explanation, but I hope this helps find a solution.&lt;/p&gt;</description></item><item><title>Re: Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69351.aspx</link><pubDate>Wed, 17 Aug 2011 06:54:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69351</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69351.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69351</wfw:commentRss><description>&lt;p&gt;What kind of form logic is setting the fields to their non-negative value?&amp;nbsp; It sounds like that&amp;#39;s being re-triggered when the form is opened, perhaps due to the loading of a data source or something like that?&lt;/p&gt;</description></item><item><title>Calculated value not retained after InfoPath form is saved.</title><link>https://www.infopathdev.com:443/forums/thread/69342.aspx</link><pubDate>Tue, 16 Aug 2011 20:39:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69342</guid><dc:creator>kcark1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=69342</wfw:commentRss><description>&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;
First, let me start by saying I have about two weeks expereince with InfoPath forms
and have run into this issue.&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;I have created a form where
the field &amp;quot;AmountDue&amp;quot; will&amp;nbsp;calculate the value based upon field
&amp;quot;NoUnitsProvided&amp;quot; * field &amp;quot;ServiceRate&amp;quot;.&amp;nbsp; If a payment
has been made against a specific line item, I want to show the AmountDue as a
negative value.&amp;nbsp; To do this, I have set a rule in the field
&amp;quot;AmountDue&amp;quot; as follows:&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;Rule 1(ServiceType =
&amp;quot;Service Payment&amp;quot;)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;the acton defined to the
above is as follows:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;=fx Set a field&amp;#39;s value: .
= (NoUnitsProvided * ServiceRate) * -1&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;When entering the data
values, the form and fields work as I expect and print with the expected negative
value for payments.&amp;nbsp; The problem is when I save the completed form and
later load to review the saved form, the negative values have not been
retained.&amp;nbsp; The formula has reverted to &amp;quot;NoUnitsProvided&amp;quot; *
&amp;quot;ServiceRate&amp;quot; and&amp;nbsp;no longer considers the desired action.&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p&gt;&lt;span&gt;&lt;font size="3"&gt;Suggestions or direction
would be much appreciated.&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;</description></item></channel></rss>