What is the simplest way to make a positive number display with a + sign in front of the number?
You can use the data formatting options to set the field to a number and then display a notation symbol. Unfortunately I think it applies the notation symbol prefix to all numbers. There are preset formats only for negative number styling.
So if you needed, you could stack two fields on top of each other, one with the "+" notation prefix. Then use the "Hide Object When" calculation to hide the field when the value is < 0. This would simulate only showing the "+" notation for only positive numbers.
Or you handcraft your own calculation
if ( number >= 0; "+" & number; "-" & number)
which may suffer from the disadvantage that it is now a text and number formatting (decimal places, ...) will not apply. If you want to handcraft these too, you find a number formatting CF in briandunning.com's famous collection. For example FileMaker Custom Function:NumberFormat ( Number ; DecimalPrecision ; ThousandSeparator ).
Perfect. Thank you. I don't need it to work for decimals, so I just used the calc as provided. Thanks to everyone who offered a suggestion.
Note that in data formatting, you can set the number of decimal places to zero and the number will display without decimal spaces. Decimal is the number TYPE, which allows you to select specific formatting options.
I have the + numbers displaying with a + and the - negatives displaying correctly. Now that this is working, the client is asking if I can replace the + sign with an "up arrow" and the - sign with a "down arrow." I don't think doing it with fonts is going to be the best solution because I don't want to get into having people add fonts to their systems. (I work with a lot of people who would not know how to add fonts). Does anyone have an idea as to how I could go about doing something like this?
You can use emoji's ⬆︎⬇︎⬆️⬇️
Yeah, but I need to employ them in the script. I tried using Char (2191) for an up arrow but it didn't look good.
Use the actual emoji not the code for it. See attached.
Thanks! I see. The up or down arrow must not only display in FM, but ultimately the FM file ends up being html. So I need to make sure it continues to display when it becomes html.
Retrieving data ...