Styled number field maintaining it numerical?
I know we can use this:
styled(text, colour, icon)
To change the background and icon for a given field.
The problem comes when you have a calculation, say “TOTAL”, which is a NUMBER (to be combined with “if” to create conditional styles, like using red background for negative numbers, green for positive…)
On these cases we should use a:
styled(text(TOTAL), colour, icon)
But then, this field becomes a TEXT, no more a NUMBER and consequently we can not use math-filtering, like sum, average, minimum, maximum…
It's possible to add a style to a numerical calculation field and maintain it like a NUMBER?
Thanks for your support!
10 replies
-
Better use a second field for that, and let that remain a number. Like a phantom field or duplicate as you prefer.
you can hide this field if you want and only use the styled field visible on the forms.Steven
-
Thanks for your reply, Steven! :-)
Yeah, that could be a workaround just to see the styled field (green por positive / red for negative) in the FORM and a second version as a number in the table.
The problem comes if you want to see that styled field also on the table view AND to be able to execute math-filtering (sum, average…) on that column.
Not a great problem. I'm extremely happy with my transition from FileMaker to Ninox. I suppose is just a question of time for this kind of features (styled numbers and others) to appear in Ninox in future releases :-)
Cristóbal
-
It is possible.
let meNumber := 33; let meStyled := styled(text(meNumber), "firebrick", "white", formatJSON({ weight: 200, filling: 1, icon: "travel_explore", color: "gold" })); number(parseJSON(formatJSON(meStyled)).text)
1. build a JSON, 2. build an Object, 3. use the pointnotation for the first part named "text" , 4. convert to number
Content aside
- 2 mths agoLast active
- 10Replies
- 1030Views
-
6
Following