0
komplex dynamic list
Scenario:
I've three dynamic lists. But the example works with the first two lists.
What I want to achieve
- I select one or more items in dynamic list one (which is loaded out of a table)
- The items in dynamic list two are based on the selection of dynamic list one.
I have a list of items in table one for dynamic list one.
I have a list of items in table two for dynamic list two + per item there is a 2nd column, where I have comma separated items of list one.
My Idea
My plan was to select the items of table two if the 2nd column contains one of the items of list one.
let selectedFachbereiche := split(text(Fachbereich), ",");
let DienstleistungsartenList := (select Dienstleistungsart where contains(text('Verfügbar für Fachbereich'), text("xyz")));
let Dienstleistungsarten := (select Dienstleistungsart);
for selectedFachbereich in selectedFachbereiche do
for Dienstleistungsart in Dienstleistungsarten do
if contains(text(Dienstleistungsart.'Verfügbar für Fachbereich'), selectedFachbereich) then
DienstleistungsartenList := array(DienstleistungsartenList, select Dienstleistungsart where contains(text('Verfügbar für Fachbereich'), selectedFachbereich))
end
end
end;
let list := unique(DienstleistungsartenList.Name);
'Test-Ausgabe' := concat(sort(list))
The "Test-Ausgabe" has a correct comma separated list of items I want to have in dynamic list two. But somehow it does not take this items as values for the dynamic list.
+ it feels like a dirty work around.
Another solution?
Probably I should work with connection-tables and somehow workout this thing with one query.
Antwort
Content aside
- vor 2 JahrenZuletzt aktiv
- 53Ansichten
-
1
Folge bereits