Hallo (again) and thank you for your wonderful support so far! 🙂
Let me explaing:
Base: Sharepoint List called "List_Fertigung_LPA_Fragenpool"
1. I create a collection used as a checklist called "colCheckliste"
2. This collection is shown in a gallery "scrCL_gal_Checkliste"
3. For each item I added a single-choice-Dropdown "scrCL_cb_Ergebnis" where the user selects a result for each collection item (choices are referencing on a choice field from sharepoint list)
4. If the user selects "red" a separate text input field "scrCL__gal_txt_Maßnahme" gets visible where the use adds a text
5. The user saves the checklist by pressing a button
6. The Sharepoint List items should now be updated for each item with each selected result and - if a text input exists - update the text to the list item.
As stated below, the text inputs are correctly transfered. But the results of the Dropdown "scrCL_cb_Ergebnis" is not updated correctly for each item.
Here's the code I use right now:
// Transfers text to sharepoint --> WORKS PERFECTLY FINE
Patch(
List_Fertigung_LPA_Fragenpool;
ForAll(
Filter(
scrCL_gal_Checkliste.AllItems;!IsBlank(scrCL__gal_txt_Maßnahme.Text)) As _item;
{ID: _item.ID;
Maßnahme:_item.scrCL__gal_txt_Maßnahme.Text //scheint zu funktionieren
//Maßnahme: IfError(Value(_item.scrCL__gal_txt_Maßnahme.Text);0) //meldet nur 0 trotz Textinput
}
)
);;
// Überträgt Letztes Ergebnis in Fragenpool --> DOES NOT WORK - UPDATES (probably) JUST THE FIRST SELECTED RESULT AND UPDATES EACH ITEM WITH THAT RESULT INSTEAD OF THE ONE SELECTED TO THE ITEM
Patch(
List_Fertigung_LPA_Fragenpool;
ForAll(
Filter(
scrCL_gal_Checkliste.AllItems;!IsBlank(scrCL_cb_Ergebnis.Selected.Value)) As _item2;
{ID: _item2.ID;
LetztesErgebnis:{Value:scrCL_cb_Ergebnis.Selected.Value} // funktioniert für Choice-Feld in SP
}
)
)