Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

Replicate live collection data in to offline collections


I'm working on a canvas app to save online data to offline collections.

Following temporary table structure,


ClearCollect(TableTempx,{priority: "xx",
        state:    "xx",
        sequence: 0,
        breakdownSymptomGroupCode:"xx" ,
        breakdownSymptomCode:"xx" ,
        shortText: "xx",
        orderNumber: "xx",
        orderClass: "xx",
        customerCode: "xx",
        center: "xx",
        equipmentCode: "xx",
        activityClass: "xx",
        adviceText: "xx",
        orderDate: "xx",
        serviceType: "xx",
        routeId: "xx",
        syncType: "xx"

Now i am trying to copy the data from collections(opernorder)  to temporary table Tabletempx with following code,

        orderNumber: orderNumber,
        customerCode: customerCode,
         equipmentCode: equipmentCode,
        activityClass: activityClass,
        adviceText: adviceText,
        orderDate: orderDate,
        serviceType: serviceType,
        routeId: routeId,
        syncType: syncType,
                orderClass: orderClass


Data is getting copied. But during offline this temporary data is disappearing.  Please guide me to debug the same. 




Super User
Super User

Hi @AVTS ,

Firstly you have an ambiguity issue - also I assume TableTempx is a collection - or is it the Table on the device? If a colleciton

   openorder As aList,
        orderNumber: aList.orderNumber,
        customerCode: aList.customerCode,
        equipmentCode: aList.equipmentCode,
        activityClass: aList.activityClass,
        adviceText: aList.adviceText,
        orderDate: aList.orderDate,
        serviceType: aList.serviceType,
        routeId: aList.routeId,
        syncType: aList.syncType,
        orderClass: aList.orderClass


Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps


Dual Super User
Dual Super User

Your basically copying one Collection to another.  Both are stored in memory.  So what you are doing will not maintain data when you exit the app.  If you want to store data while you are offline then you need to use SaveData() and LoadData() to store the collection.  Be aware that these will only work on Mobile devices with a player, like IOS and android.  SaveData, LoadData, and ClearData functions in Power Apps - Power Apps | Microsoft Docs

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks @Pstork1 ,

I may have misread the question - @AVTS can you please confirm by "offline" you mean the app closed, not that the data disappears while you are using it offline.

He says he is copying an online collection to save it offline.  There is no such thing.  Collections by definition are local, so they only need to be saved if you are shutting down the app. I suspect he is going offline and when he re-opens the app the local collection is no longer there so he is trying to save it in a data structure.  The only way to do that would be SaveData.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 ,

Agree totally 

Super User
Super User


I am having challenge here. I'm developing an application in a location where there is no network access, hence I should use the power app offline mode. As an example, at the beginning of each day, a call flow is invoked to obtain online data and save it in an offline cache (virtual table). And then, regardless of connection state, begin working on the offline cache (virtual table). And offline cache (virtual table) would like to display it on a data table  . And later on will transmit this offline cache (virtual table) to another online table . 

Is this possible? 




As @Pstork1 mentioned, you need to use SaveData/LoadData if you want to retain your temporary table in the case of the app closing before it is saved online. Also for any app with data connections (online) I have found it needs to be opened online to initiate the connection, so the offline capability is a bit limited to areas with poor signal where you can open it.

Super User
Super User

Agreed, Warren . Here during connection active time we are receiving the data from flow ,Code follows,


And saving the collections (test1) to offline data (TableTempx) , Code follows



For loading i am using following code ,



Now i am unable to verify the the data is properly copied from test1 to TableTempx1. How to show and verify the data from offline cache.


Following screenshot from web browser and all test is carried in Mobile.




What have you got to verify it against? It involves a bit of trust in the process I think.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,130)