Auslesung von DMFA mit nicht nachvollziehbaren ID Referenzen
Ich arbeite gerne mit DMFA, aber jetzt bin ich ratlos:
Ich habe ein DMFA SceltaPaesi aus eine Tabelle mit Ländern erstellt
let myImpreseNazione := unique((select Imprese).Nazione);
for i in myImpreseNazione do
first((select Imprese)[Nazione = i])
end
soweit - so gut. Beim Versuch die SceltaPaesi auszulesen, bekomme ich ganz eigenartige Adressen (rechts unten im Bild mit Feld Text ist das Ergebnis - links unten ist die Darstellung der SceltaPaesi in eine Formel).

Das Script zum auslesen ist eigentlich auch einfach:
let my := this;
delete (select Paesi);
let myPaesi := my.SceltaPaesi;
for i in myPaesi do
if i != 0 then
Text := Text + i + ",";
let newPaese := (create Paesi);
newPaese.(Nazione := text(i))
end
end
Was habe ich hier nicht verstanden? Ich dachte, dass ich die Adressen der Länder ganz einfach auslesen kann.
1 Antwort
-
When you create a dynamic choice field from a table, Ninox is creating an array of record IDs. When you create your dynamic field you have the option to select the data you want to show in the field. The Dynamic value name is where you set it.

In my example I select all records from the Products table and show the data from the ItemName field.

There are a few ways to access the selections.
One way is to use the numbers() command. The Show Numbers field shows you what you get when you use the command. Ninox returns an array of numbers (6, 15, and 17), which correspond to the record ids of the products selected.
Another way is to use the text() command. The Show Text field displays a string of the data that is used to display your choices.
The most important one is the record() command. Since you have the record id of the selected choices you can use the record command to retrieve the exact record you selected and then get any data that is available.
Now how to solve your question.
You can change the Dynamic value name of the field to show the country names.
You can change the formula for the Text field to:
for i in numbers(SceltaPaesi) do record(Imprese,i).Nazione endYou see now you have an array of country names.
Content aside
- vor 1 StundeZuletzt aktiv
- 1Antworten
- 2Ansichten
-
2
Folge bereits
