cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Romsteck
Level: Powered On

Offline Apps - Relational Data

Hi there 😁,

 

I spent hours and hours to find how to set up Offline Mode in PowerApps.

And I didn't found ...

 

I have an App that manages presences in events.

 

I need to make this app available offline.

There are differents problems : 

 

1.

I don't know how to work with Offline relational data, despite the Microsoft Documentation related to.

 

- How to save lookup column content in a collection and in LocalStorage ?

- How to show this related content in the app ?


2.

I have a two Option Set  (Boolean) "Yes"/"No" to see and patch presence.

When I click the Toggle, it patches the local collection, no problem here.

 

But when I run the app offline, with the collected data, I can't get the value from the option set, So I can't patch local collection.
Default forToggle1 is :

 

If(
    ThisItem.Presence = 'Presence (Days Attendance)'.Yes;
    true;
    ThisItem.Presence = 'Presence (Days Attendance)'.No;
    false;
)

 

Onselect for Toggle1 is :

 

If(Toggle1.Value = true;
Patch( CachedDaysAttendance; LookUp( CachedDaysAttendance; 'Day attendance' = ThisItem.DayAttendance); {Presence:'Presence (Days attendance)'.Yes});
Patch( CachedDaysAttendance; LookUp( CachedDaysAttendance; 'Day attendance' = ThisItem.DayAttendance); {Presence:'Presence (Days attendance)'.No})

 

 

Thanks in advance for your answers !

 

Have a good day 😁 😎

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Offline Apps - Relational Data

1) Data in an offline app is stored as a collection. So there really isn't any concept of relational data when using offline local data in Power Apps. Records in a collection can have a hierarchy of nested tables, so it can record the results of lookups.  But its just the actual reference values that are recorded, not the relationship itself.

2) As mentioned in #1 lookups, like choice columns or toggles, record the current value, not all the options.  For things like choice columns you have to have a separate collection that saves the available options offline. Then you can use that if you want to change the offline value in the collection to something different.



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

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Offline Apps - Relational Data

1) Data in an offline app is stored as a collection. So there really isn't any concept of relational data when using offline local data in Power Apps. Records in a collection can have a hierarchy of nested tables, so it can record the results of lookups.  But its just the actual reference values that are recorded, not the relationship itself.

2) As mentioned in #1 lookups, like choice columns or toggles, record the current value, not all the options.  For things like choice columns you have to have a separate collection that saves the available options offline. Then you can use that if you want to change the offline value in the collection to something different.



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

View solution in original post

Romsteck
Level: Powered On

Re: Offline Apps - Relational Data

Hi @Pstork1 ,

 

So the only way to use relationships between entities is to run PowerAppa in online mode ?

It's a monstrous problem 🙄😰

 

Ok I will do this for my option sets.

 

Thanks you very much for help !

 

Have a good day 😉

Dual Super User
Dual Super User

Re: Offline Apps - Relational Data

Its not that you can't have relationships between things stored in collections.  Its that there is no built in way to apply those relationships.  It needs to be built-in to your code when you are offline.



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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,566)