Please be so kind as to read my full post before responding. Thank you for your consideration.
In one PowerApp I have built something akin to a multi-select picklist using two Galleries. The purpose is to assign Orders to Delivieres. Orders are collected locally into LocalOrders upon App.OnStart or RefreshButton.OnSelect.
To upper Gallery (containing the Orders assigned to the current delivery) has Items
as formula of the + Icon Relate/Unrelate takes care of the LookUp fields/Relational Data table on the CRM side. On the local side I use Patch.
The UnassignButton does everything I expect it to do, setting the lookup field to Blank in the CRM and in my local collection. Also both galleries seem to always refresh Items whenever I use this UnassignButton.
However, the AssignButton appears to sometimes work, and sometimes do nothing. A closer look tells me that on the data level setting the CRM and in my local collection both work properly. But, the galleries don't update and still show me (wrong) Items in both galleries. It appears as if the recomputation of both gallery Items isn't triggered upon setting the relevant lookup fields in my local collection LocalOrders. Exiting the screen and reloading the delivery properly refreshes both galleries, which then show the previously reassigned orders in the correct galleries.
Can I manually trigger the recomputation of Gallery.Items?
Why does my UnassignButton and setting the lookup field to Blank apparently trigger a recomputation of Gallery.Items while setting to a nonblank value does not?