"Refresh" data in a user session

Hi,

I want to refresh the datasource when a user starts a certain processs. E.g. a user wants to deduct from a order total, but to make sure that not another user has deducted anything since the user loaded the app, I want to “Refresh the datasource”.

Is there a smart way to refresh / reload data in the database?

I know I could use subscribe functionality or strict object versioning, but this feature is only required for a small part of the functionality and there it seems to be a bit overkill to implement the std. features.

Hi!

Assuming that the data source in question is database connected, you can turn the data source off and on again just before the user starts the process. You do this by using the Set Data Source Attributes action node, setting the Disabled field to true and then false right after. This will ensure that you get the latest data from the database before the user engages in the process.

If the data source in question is runtime only, you can simply do a read directly from the database just before the user starts the process.

Hope that helps!

Thanks for the reply - I tested to do a read from the database, but it seems I have to toggle Disabled before doing a read.

Would be great to have a read function with option the to get the latest from the database

Reading directly from the database to a runtime only data source, i.e., not having “Read from other” checked should get the latest from the database.

If you have to toggle Disabled before doing the read, it sounds like you’re reading from a database connected data source.

Yeah , I was reading from “other” datasource. Will try to turn that off. Thanks