• Resolved sbservices

    (@sbservices)


    Hi, I’m creating a ratio calculator for pictures.

    I’ve created 2 number input fields (fieldname2 and fieldname3) for height and width of the picture frames.
    Then a calculated field (fieldname1) that calculates the greatest common denominator formla as:

    gcd(fieldname2,fieldname3)

    Then another calculated field (fieldname4) to divide the width in fieldname2 by the GCD

    fieldname2/fieldname1

    And another calculated field (fieldname5) to divide the height by the GCD

    fieldname3/fieldname1

    Then I added another calculated field to display the content of the fieldname4 and fieldname5 as a concatenated output, but it keeps putting both numbers on two separate lines.

    I want to display the output of the calculation as

    fieldname4:fieldname5

    so example is a picture that is 9 cm width x 12 cm height should give the ratio answer of

    3:4

    where 3 is fieldname4 and 4 is fieldname5

    How can I concatenate the two answers from fieldname4 & fieldname5 and add a colon (:) inbetween the two numbers?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @sbservices

    Thank you very much for using our plugin.

    You can use the CONCATENATE operation:

    CONCATENATE(fieldname4,':', fieldname5)

    Or, since the plus operator is overloaded, you can use it for concatenation:

    fieldname4+':'+fieldname5

    Best regards.

    Thread Starter sbservices

    (@sbservices)

    Hi, thanks so much for the speedy reply. That works great.

    I had been trying with double quote marks, which is why it was not working for me originally.

    Your single quote version works perfect, thanks a million

    Plugin Author codepeople

    (@codepeople)

    Hello @sbservices

    You can use double quotes too, both symbols are valid. Like:

    CONCATENATE(fieldname4,":", fieldname5)

    Or

    fieldname4+":"+fieldname5

    But be sure you are using the correct double quote symbols.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ratio Calculator – Display results?’ is closed to new replies.