How to Delete in Read/Write pattern without waiting for sync to update local storage

Hi,

could you please help me to find a solution for the following issue:

When implementing the Read/Write Data Last Write Wins pattern, when I want to delete a local storage record, this same record is efectively deleted when online and syncing with server, meanwhile the record exists and is still visible.

What shall be the client logic for deleting a record from local storage, without waiting for syncing for that record stop being visible?

The ToDos exercise unfortunately does not presents the delete option.

Thank for your help,

Luis


Hi,

I don't know if I understood correctly ... You want to delete a record from the local table, without waiting for synchronization with the server, that is, even when you are Offline, you want that when deleting a record it is even deleted from the local table. Did I understand your question well?


Hi Nuno,

I want to delete a record from the local table, without waiting for synchronization with the server. In Read/Write Data Last Write Wins pattern as implemented at Outsystems documentation, the Local Storage Record is not deleted while offline, than we have to online sync  with server to delete the local storage record.

Thank you,

Luis

Solution

One idea is to add an attribute to the table, for example with the name IsActive, and when you delete a row in the table, before you delete it, put IsActive to false, and then you delete it, and on the screens you are show, filters also only for those who have this attribute IsActive to True, and thus guarantee that you only see what you should see without having to wait for synchronization. What does this idea look like to you? Do you think it helps you?

Cheers,
Nuno

Solution

It seems a very good idea. I will try it, and give you feedback.

Thank you for your quick response,

Luis

Hi Nuno,


your idea works perflectly.

Thank you very much for your help.

Regards,

Luis

I'm very happy to be able to help you. =)