0

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

null
    • Fred
    • 2 days ago
    • Reported - view

    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.

      • j_espi
      • 2 days ago
      • Reported - view

       

      Hello, Fred, thanks.

      That doesn't work, and I don't understand why.

      In the previous post I have described the configuration of the field and the tables in case there were any cause related to it, because I do not understand why that happens.

      As you say, go to the formula field configuration window, active the format that I want for the field and nothing happens. The result is maintained in flat number without separation of thousands and unable to add the symbol of the currency.

      • Fred
      • 2 days ago
      • Reported - view

      I got ahead of myself. I should have asked what is the relationship between Tascion and Inmuebles? Which side is the 1 and which side is the many (N).

      What is the relationship between Inmuebles and Contratos de arrendamiento? Who is the 1 and who is the N?

      You might have to use the first() command to get the data you need.

      • j_espi
      • 2 days ago
      • Reported - view

        

      "Tasación" N:1 Inmuebles

      "Contratos arrendamiento" N:1 Inmuebles

      "Tasación" has no direct relationship with "Contratos arrendamiento"

    • Fred
    • 2 days ago
    • Reported - view

    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.

      • j_espi
      • yesterday
      • Reported - view

       

      Thank you very much for your attention and patience.

      Best regards.

      :)