i have developed a screen in powerapps that does inserting data from collection to SQL ( using ForAll, Patch), and also delete (by using the Remove) from SQL and local collection.
my problem is suppose I add 4 line items locally, and then save to SQL, and immediately call the saved data to display again in the gallery, is not working in a single button (OnSelect), and adding another button to relaod the data, it is working but i need to click few times, to get the data from SQL and bind to the Gallery.
there are like different scenarios like
1. adding first time locally and then save to SQL
2. retrieve data from SQL, then adding new records OR edit the SQL records and then save back to SQL
3. retrieve data from SQL, delete the saved data, then add local data, and edit / delete the local data and finally save to SQL
and in all this scenarios once saved to SQL, call the latest data from SQL and display in Gallery is not working consistently. All the above doing in a single screen
Please advise in case this can be done in different ways..thanks in advance