Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

Repeater does not get updated when Data Provider is refreshed #13470

Closed JohnM053 closed 6 months ago

JohnM053 commented 6 months ago

Discussed in https://github.com/Budibase/budibase/discussions/13465

Originally posted by JohnM053 April 11, 2024 Hi folks, for a few days now, I've been trying to solve the following issue. I'm not sure if I'm doing something wrong or if it's a bug. In my application, a Google Sheet is connected with Budibase. Users can make changes to an entry in a side panel. However, before the changes are saved, I want to check if the entry has not been blocked in the meantime (meaning the time between calling up the entry and opening the side panel and pressing the Save button). This is indicated by the word "BLOCKED" in a specific column. If it has been blocked, the changes should not be saved.

Here's what I've done so far: As an on-click action of the Save button, the Data Provider should first be refreshed, and then using Continue-if/Stop-if function calling the Repeater, it should be checked whether the entry has been blocked in the meantime. The problem is that although the Data Provider is refreshed, the Repeater still returns the old value (i.e., before the Data Provider was refreshed). That means that even if the entry has been blocked in the meantime, the row gets saved.

Has anyone else encountered this issue? Or do you have a workaround for this?

Unbenannt 1

linear[bot] commented 6 months ago

BUDI-8171 Repeater does not get updated when Data Provider is refreshed

aptkingston commented 6 months ago

Hey @JohnM053.

I think the issue here is that the "refresh data provider" action is not synchronous, so your following actions will continue before the refresh is actually completed. We could potentially add a new option to that action, so that you can choose if you want to wait for the data to be refreshed or not. Feel free to open a feature request for this if that sounds like something you'd be interested in.

There are 2 other solutions that come to mind, but both are paid features: