cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lukas1
Advocate II
Advocate II

Offline App: How to merge offline and online data

The PowerApps documentation says about te functions SaveData and LoadData:

"Also, the functions do not automatically resolve merge conflicts when a device returns to connectivity from offline – configuration on what data is saved and how to handle reconnection is up to the maker when writing expressions"

 

That makes sense, but I don't how to do it...

Here is the situation:

My users can add new customers into a collection while being offline. They can also add new locations which belong to a certain customer into another collection while being offline. The locations and customers are linked to each other by the customer ID.

 

My "backend" are sharepoint lists, one called "Customers" and another one called "Locations". Both have auto-incremented ID's when a new item is added. I want to link locations and customers via the ID, but the ID's are not the same than in the offline app.

 

My workaround is to work with temporary ID's and change them to static ID's in a PowerAutomate flow. But there must be an easier way, right?

 

Looking forward to your replys 🙂

Thanks and have a nice weekend,

Lukas

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @Lukas1 ,

Yes, using SaveData and LoadData functions will not deal with the conflicts problem.

Since your ID is different online and offline, it can not compare data between online and offline.

I could only give you two solutions:

1)use another unique field that is the same data online and offline to compare

2)not set ID auto-incremented

Also, please refer the doc about how to build an offline and online app:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yutliu-msftThanks for your reply. That's what I thought but I was hoping for an easier solution.

 

Regards,

Lukas

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (25,368)