2 Replies Latest reply on Mar 14, 2013 3:26 AM by hanstrager

    input in one field needs to do auto calculate in another field

    hanstrager

      Title

      input in one field needs to do auto calculate in another field

      Post

           Im making a small application for keeping track of my receipts.


           Sometimes I'll by stuff in different currency which i'll need to have converted into lets say $.

           So I have 3 fields:

           1) is "totalAmountDollar" in $ where i nost of my receipts goes.

           2) is "totalAmountEuro" where i would put anything paied in Euro's

           3) extra field to indicate if something has been put int the "totalAmountEuro" field.

            

           What im trying to have these 3 fields to do, when i put something into "totalAmountEuro" field it needs to override whats in the "totalAmountDollar", and calculate and put into "totalAmountDollar" how much the the euro amount would be in dollars. Further more it needs to change the colour of the text in "totalAmountDollar" into blue. Aswell when something is put into "totalAmountEuro" the 3rd field will automatically come up with a euro sign...

           Is this possible..?

        • 1. Re: input in one field needs to do auto calculate in another field
          MarcMcCall

               Unless someone else on here has a better idea, I would rethink it just a little bit.

                

               First I would make a global field calld conversionRate or something like that, incase the conversion ever changes it easy to change.  I did this with 4 fileds and some conditional formatting.

               CoversionRate  Global Number field

               TotalAmountEuro  Number field

               TotalAmountDollar  Number Field

               cDollarAmmount  Number field Auto enter Calculation  

               Calculation = Case ( not IsEmpty(TotalAmountEuro) ;TotalAmountEuro * CoversionRate ; IsEmpty(TotalAmountEuro) ;TotalAmountDollar ; TotalAmountDollar )

                

               Then apply conditional formating to cDollarAmmount  Calulation= not IsEmpty(TotalAmountEuro)  apply color format.  This will change color if there is anything in TotalAmountEuro

                

                

          • 2. Re: input in one field needs to do auto calculate in another field
            hanstrager

                 It's almost doing what I want, but not completely.

                 I've got 4 fields

                 1) "Conversionrate" - global number field

                 2) "TotalAmountDollar" - number field

                 3) "TotalAmountEuro" - number field

                 4) "cDollarAmount" - number field with autoenter calculation with the following:

                 Case(not IsEmpty(TotalAmountEuro); TotalAmountEuro * Globals::Conversionrate ; IsEmpty(TotalAmountEuro); TotalAmountDollar ; TotalAmountDollar)

                 not IsEmpty(TotalAmountEuro); TextColor ( text ; RGB ( 0 ; 0 ; 100 ) )

                  

                 If i put a number into "TotalAmountEuro" it converts the amount based on whats in the exchange rate field, which then shows up in "cDollarAmount". But it should really show up in "TotalAmountDollar". Also it dosen't update when in a different amount into "TotalAmountEuro"..?

                 What I really want to appear in "cDollarAmount" is a €-sign that turns blue when something has been typed into "TotalAmountEuro"

                 I can't really get the above colorformatting to work, but im sure it has something to do with my inexperience...