help with IF calculation

Viewing 5 reply threads
  • Author
    Posts
  • January 5, 2017 at 3:47 PM #20739

    Andrew Mead
    Participant

    Hi Brendan,

    I am trying to use the IF calculation but am obviously not understanding its logic.

    Lets say I have a field called city with a value of ‘Toronto’. I am trying to write the IF calculation to return a country value of either Canada (if city does equal Toronto), or of it doesn’t then return America.

    My thinking was that I could write it as IF(City = ‘Toronto’, then ‘Canada’, else ‘America’)

    can you please show me the correct syntax (as tap forms does not give any indications as to what is wrong)

    Many Thanks

    January 5, 2017 at 6:37 PM #20741

    Brendan
    Keymaster

    Unfortunately right now the IF function doesn’t work with text data. It only works with numeric values.

    January 5, 2017 at 6:50 PM #20742

    Andrew Mead
    Participant

    Hi Brendan,

    OK let me change the scenario then. How would the calculation look if I had wanted to know if field ‘Score’ has a value was less than 10, then put in 1, else put in 20

    My limited if , then else logic tells me it would something like

    If(Score < 10, 1, 20)

    Thanks

    Andrew

    January 5, 2017 at 7:24 PM #20743

    Brendan
    Keymaster

    Yes. What you have now is perfectly correct.

    January 5, 2017 at 9:02 PM #20744

    Andrew Mead
    Participant

    Hi Brendan,

    Sorry to ask another question, but now I have that working how would the min and max functions operate

    I am trying MIN(field name) but it is not returning a value

    The field name is a numeric value

    Thanks

    Andrew

    January 6, 2017 at 12:19 AM #20747

    Brendan
    Keymaster

    min and max are multi-parameter functions.

    So your formula would be:

    min(field 1, field 2, field 3)

    That would return the minimum value from the set of fields provided.

    The same for the max function.

    The online user manual describes how each of the functions work:

    https://www.tapforms.com/help-mac/5/en/topic/calculations

Viewing 5 reply threads

You must be logged in to reply to this topic.