Mehrfachauswahlfelder mergen
Ich habe eine Datenbank, die viele Datensätze hat, die eigentlich Duplikate sind, aber in einigen Bereichen unterschiedliche Werte haben. Ich habe nun ein Skript geschrieben, das zwei untereinanderliegende Records miteinander vergleicht und die Zahlen- und Textfelder, wenn sie unterschiedlich sind, zusammenfügt oder - wenn sie leer sind - füllt.
Soweit so gut. Jetzt habe ich aber das Problem mit den Merhfachauswahlfeldern. Der folgende Code war ein Versuch, der aber scheiterte. Ich weiß gerade nicht weiter, wie ich aus einem Merhfachauswahlfeld eines Records, diesen Wert dem Mehrfachauswahlfeld eines anderen Records hinzufüge. Hat da jemand eine gute Idee? Das wäre lieb.
Danke. Alex
this.(Standort := if this.Standort = null then partner.Standort
else if partner.Standort = null
then this.Standort elseunique(concat(numbers(this.Standort), numbers(partner.Standort)))
end);
3 replies
-
Hi ,
One option is to try the unique() function. Here's an example of what I mean:
let x := PreviousRecord.'Multiple choice'; 'Multiple choice' := unique(numbers('Multiple choice'), numbers(x))
-
Hi Sotirios, thank you for your reply, I've tried it, but the following code creates an error:
let x := partner.Standort;
this.Standort :=
if this.Standort = null then
x
else
if x = null then
this.Standort
else
unique(numbers(this.Standort), numbers(x))
end
end;It says that there are different data types in "else" in multi, [numbers]. I really don't know what to do with this. I figure that it has something to do that a string might meet a number or a number an array, but I don't know how to implement it. :/
Thanks for your help!
Alex.
Content aside
- yesterdayLast active
- 3Replies
- 23Views
-
2
Following