Need Formula on Chart
I have a multiple selection dynamic
let uni := unique(((select Gastos) order by Categorias).text(Categorias));
for i in uni do
first((select Gastos)[text(Categorias) = i])
end
Copy
I need the Formula on Chart, so that once I select an option on MCd, it show me the values of that option.
I use this but don't Work
for i in numbers(MCd) do
record(Gastos,i)
end
4 replies
-
What kind of field is Categorias in Gastos?
The way you created your Categorias dynamic multichoice field is an interesting way of doing it. The one thing I see is dynamic choice fields are based on table records so at the root of the field is a record Id. You asked Ninox to create a dynamic field based on the first instance of a record that has that Categoria.
You may want to create a Categorias table that has just one record for each categoria. Also as your Gastos tables grows it will slow down the creation of this dynamic choice field.
For the second part:
I'm guessing you want to find all records in Gastos that have matching selection in Categorias with the selection in MCd?
-
said:
Yes I Have a Categories Tables.May I ask why you don't use it as the base for your dynamic field? It would mean you would probably want to change Gastos.Categorias as well, but to standardize around the same categories will make things easier in the long run.
said:
The Second is yes.Maybe you can do something like this in a formula field:
let x := for loop1 in numbers(MCd) do let getRec := record(Gastos,loop1); getRec.text(SimpleChoice) end; let a := (select Gastos)[var suba := text(Categorias); count(x[= suba]) > 0]; concat(a)
You can verify if the correct records are being selected as you make your selection. Of course if you change the root table of your dynamic fields then the code will have to change.
Content aside
- Status Answered
- 1 yr agoLast active
- 4Replies
- 88Views
-
2
Following