I'm currently trying to create a Microsoft Teams Canvas App using Microsoft PowerApps. Within my App I've got different galleries displaying the data of different data tables. Now I've implemented a confirmation modal for data deletion, but unfortunately I'm not possible to pass the table itself to a context variable to perform a dynamic deletion.
What I've tried is the following:
My deletion trigger for my streams table sets a table identifier and the item to be removed. Also they call the modal:
If(
!IsBlank(_galStreams.Selected);
UpdateContext({
RemoveFrom: 1;
ToRemove: _galStreams.Selected}
);;
Set(ModalActiveRemove;true)
)
The same trigger is existing for a second gallery with another Identifier (2).
Now on my deletion confirmation I've added the following logic to the confirmation symbol:
Switch(
RemoveFrom;
1; Remove(streams; ToRemove);
2; Remove(objectives; ToRemove)
);;
UpdateContext({
ToRemove: Blank();
RemoveFrom: Blank()
});;
Set(ModalActiveRemove; false)
When working with only the streams trigger and table (so only one case) everything is working as supposed. But as soon as I try to use the second trigger, the "ToRemove" item is not identified as part of the second table and I'll receive an incompatible type error.
Is there any way to achieve a correct behavior?
Best regards
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…