I can't format number in formula field
Good afternoon everyone
I have a table called "Tasación" that is related to a call "Inmuebles" that in turn is related to a so -called "Contratos de arrendamiento" in which there is a field called "Renta mensual bruta".
What I want is that in a field of calculation in the Tasación table called "Renta mensual bruta" I give me the result of the field called by the same name of the table "Contratos de arrendamiento", but I do not want it to be the sum or the average, etc., but the amount that appears in that record and that I do it simply like this: Fórmula: Inmuebles.'Contratos de arrendamiento'.'Renta mensual bruta'
But there is an inconvenience, I am using the Ninox APP 3.15.4 version for Mac OS, and it shows me the result as a flat number, without separation of thousands or decimals and neither can you add the currency symbol and there is no way to give it format with separation of thousands and with the suffix symbol of euros. I don't know if it's a program bug or what.
Thanks for the attention
Note: Google Translation
6 replies
-
If you are using a formula field then in the edit window of the formula there is a Number format section where you can set the formatting.
-
Take the code in your formula and put debugValueInfo() around it:
debugValueInfo(Inmuebles.'Contratos de arrendamiento'.'Renta mensual bruta')
Remember this command as it will come in handy as you write code and need to see what the results look like.
I'm guessing it will return an array, a number inside square brackets, even if it is only 1 number. Look something like:
number([5]) <- just sample data
That is because the Contratos table is the many to Inmuebles so Ninox will always return an array since there could be many Contratos records related.
If that is so then try replacing debugValueInfo with first or last and then it should give you a single number, which then Ninox can format properly.
I don't know if there is only 1 Contratos record related to each Inmuebles. If that is how the tables work then first or last will work fine since Ninox will always return 1 record.
But if there could be many Contratos record to each Inmuebles then you will need to figure out which Contratos record you need to get the data from.
Content aside
- Status Answered
- yesterdayLast active
- 6Replies
- 35Views
-
2
Following