457
Views
7
Comments
How to Sync local storage to server
Question
Application Type
Mobile
Service Studio Version
11.14.14 (Build 59901)

I am new to mobile app development I don't have a knowledge on syncing local storage to server 

If you guys sent me any demo oml it's better for me to understand  

   Thanks for your help in advance  

2021-06-02 20-50-04
Márcio Carvalho

There is a Course for that, that shows you how to do the Sync

https://www.outsystems.com/training/courses/170/data-synchronization/

Basically using the 

Then you just need to call your sync client action that will deal with all the data inside. In this case, will update the storage with the data from the server and will remove/update/create the ones that were removed/updated/create in the storage on the server too.

And when you want to do any action you call the client action created to do the sync, instead of the local entity action.

Careful, there will be some times when you will need to adapt the logic to your use case. This is not straightforward.

ps: don't forget to put to true this sync configuration if you want to sync on login or on online, etc.

Check the OML

sync.oml
UserImage.jpg
Robo shankar

I followed those steps but my screen got crash 

2021-06-02 20-50-04
Márcio Carvalho

I don't know how how to help you with that :D But Have a look at the link that I shared and have a look at what I tried to explain to you, what I shared will not be always this easy, but yeah this is the way to go, you just need then to think about how to do sync with your specific case.

Have a look at this too.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Offline/Implementing_Offline_Sync?_gl=1*m3zq1p*_ga*MTg4ODIwMjQ2OS4xNjQ5OTIxOTkw*_ga_ZD4DTMHWR2*MTY1MTQwNzA5NS4yLjEuMTY1MTQwODkxOC45#3._Configure_manual_start_of_the_sync

Regards,

Márcio

2022-04-29 09-08-10
Pramod Torase

hello @Robo shankar ,

Check out this demo application.

https://www.outsystems.com/forge/component-overview/1638/offline-data-sync-patterns

In this application they implemented all the data sync patterns(read,read-write,1-many,r-w conflict etc.)

this will help you to understand how data sync work in outsystems.


Regards,

Pramod.

2025-04-16 10-58-33
Priyanka Babar
2021-12-30 04-42-54
shweta chaudhari

Hello  @Robo shankar 

Please find the attached "DataSyncSample.oml"

This will help you to understand how data sync work in outsystems.

Regards,

Shweta



DataSynSample.oml
2024-09-12 02-43-38
Deepsagar Dubey

HI Robo,

I hope you are doing well.

Thanks to Outsystems to make this process very simple, Simply right click on your local storage entity, and select and select Create action to Sync (Read/Write), then it'll automatically create few client actions and server action.

You can put your own logic there also you can control sync operation in OfflineDataSyncConfiguration client action or you can explicitly trigger sync action using TriggerOfflineDataSync client action 


Thanks 

Deep

 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.