Using Multiplication between two fields - InfoPath Dev
in

InfoPath Dev

Using Multiplication between two fields

Last post 03-15-2010 12:34 PM by Aruna Akella. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-15-2010 09:38 AM

    Using Multiplication between two fields

    Hi

    I have Master/Detail form

    In the repeation section i would like to do some calculations.

    for instance i would like to take fields from my datasource and multiply them to get the value for another field.

    So Annual Interest Rate Only = MortgagteAmount * InterestRate

    When i do this i get and Invalid Data (NaN): For every calculation:

    This is what i did

    Right Click on AIR Field > Select Text Box Properties > Select Value (fx) > Clicked Insert Field > Select MortageAmount > add * > Clicked Insert field > Select Interest Rate

    @MortagageAmount * @InterestRate

    Click Verify Formula ----> The formula does not contain any errors

    Close

    Go to Preview

    $0 shows as default

    retrieve record(s)

    Red Box with NaN displayed

    (Note: this works if i simply mutiply by a constant (1,2,3,4,etc......) but not when i multiply by field

    Example of field values

    $10,0000 * 5.5 when error occurs

     

    thanks in advance

  • 03-15-2010 12:34 PM In reply to

    Re: Using Multiplication between two fields

    Locked Reply Contact
    I am an InfoPath newbie and it would be nice to share and learn from others. So, let me give this one a shot.    I am using IP 2007. Here are the detailed steps.  
    1. I added 3 text boxes.
    2. In the first text box (field1) - change the datatype = "Whole Number (interger)" and format = "Currency" with a default value to 100000.
    3. In the second text box (field2) - change the datatype = "Decimals" and format = "Number" with a default value = 5.5.
    4. In the third text box - change the datatype = "Whole Number (interger)" and format = "Number" and click on the fx button and insert formula = field1 * field2.
    5. Verify the formula (it should work.)
    6. Preview the form. You should see the value(550,000) in the third text box. 
    Hope this helps!                                                                                                                                                                                               
    Aruna Akella
    Qdabra® Software / InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.