0

Formatting a formula result in a subtable

I have added a formula column/field to a subtable to calculate the percentage of two currency values. The result comes out as a currency and I can't see a way of changing the format to %.

I can see that if I create a formula as a field within a table, there is an option to set the format. But when dealing with a subtable in a form, there doesn't appear to be an option.

I'm playing about with the example 'recipes' database which contains an 'ingredients' subtable.

4 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    The first number of the formula gives the number's currency or %.

    eg if you calculate this 100€ * 20% / 100 it wil give 20€

    if you calculate 20% / 100 * 100€ it wil give 20%

    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    Note that 20% in your numberfield is a value of 20 and not 0,2. %-sign is just an indicator. 

    • jamietshaw
    • 5 yrs ago
    • Reported - view

    Thanks, that's useful to know. However, in this case I'm dividing two currencies to get a percentage:

    cost of item / total cost = %
    e.g. 5€ / 20€ = 25%

    However, I think your answer has prompted me to find a way of doing it:

    round(number(cost of item / total cost) * 100) + "%"

    ...seems to work.

    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    👍

Content aside

  • 5 yrs agoLast active
  • 4Replies
  • 1850Views