Cross conversion

Viewing 7 reply threads
  • Author
    Posts
  • December 11, 2014 at 5:27 AM #12226

    Ken Gillett
    Participant

    I want to be able to store a value, e.g. a length, but it might need to be entered in different units, e.g. mm or cms or inches etc. I only need to store one and could calculate the others, but how could I set it up so the value could be entered in any of the units and have Tap Forms automatically calculate the other?

    December 12, 2014 at 2:31 AM #12258

    Brendan
    Keymaster

    Hi Ken,

    That wouldn’t work with only one field. You’ll have to pick a single unit and let Tap Forms compute the other units for you.

    Thanks,

    Brendan

    December 12, 2014 at 3:00 AM #12269

    Ken Gillett
    Participant

    Can you use any form of conditional logic in calculations?

    December 12, 2014 at 3:17 AM #12271

    Brendan
    Keymaster

    Yes you can.

    IF(condition is true, then return value 1, otherwise return value 2)

    For example:

    IF([Price] > 100, 1.05 * [Price], [Price])

    What that means is if the value of the Price field is greater than 100, then return the Price field multiplied by 1.0.5, essentially adding a 5% tax to the Price. If it’s less than or equal to 100 then just return the Price value because there’s no tax on it.

    Hope that helps!

    Brendan

    December 12, 2014 at 3:23 AM #12274

    Ken Gillett
    Participant

    Excellent. Didn’t realise it could do that. I’ll give it a go.

    Thanks Brendan.

    December 12, 2014 at 3:35 AM #12277

    Brendan
    Keymaster

    I haven’t really made that public. It’s actually a new feature of the new Math parser that I’m using now.

    But since the cat’s out of the bag, these are some other functions you can use too:

    SQR
    SIN
    COS
    ATAN
    SINH
    COSH
    COTAN
    TAN
    EXP
    LN
    LOG
    SQRT
    POW
    LOGN
    ABS
    SIGN
    TRUNC
    CEIL
    FLOOR
    RND
    INTPOW
    MIN
    MAX
    MOD
    IF
    SUM

    December 12, 2014 at 3:48 AM #12279

    Ken Gillett
    Participant

    Does it work with text?

    December 25, 2014 at 12:27 AM #12469

    Brendan
    Keymaster

    Oops. I didn’t see your reply to this thread.

    The mathematical functions don’t work with Text, but you can concatenate Text fields together like this:

    [First Name] + ” ” + [Last Name]

    Where [First Name] and [Last Name] are your fields.

    Thanks,

    Brendan

Viewing 7 reply threads

You must be logged in to reply to this topic.