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

Load Choice values when app is opened offline

Hi, 

 

I have a form with +150 fields, lots of them are choice values. The apps is planned to work with offline capabilities and almost all is set. I found an big issue, when the app is opened offline and you get into the form Screen, the choices dropdowns doesn't load the values (I think it is obvious since the form is connected to the data connection in order to get the choices data). I haven't contemplate this before.

 

The app is needed to have the choices values when it is offline and the app is opened offline.

What can I do to solve this? The least thing i'd like to do is to focus on a manual approach in which I would have to create +150 inputs plus titles, plus delete them all when data is loaded, etc. 

 

What I tried to do is to change DataCardValue's form Items field at Advance properties from (i.e.):

Choices('SharepointList1'.gender) 

to: 

["Male", "Female", "Other"]

But when I publish the app, it doesn't appear when PowerApps is opened offline, I don't know why. 

The data source is a sharepoint list (in case this is relevant...)

 

Thanks! 

2 REPLIES 2
hnguy71
Level 8

Re: Load Choice values when app is opened offline

You can first check to see if you're online. If you're connected, then give out the choices from SP otherwise give them a choice from a manual list. For instance:

If(Connection.Connected, Choices('SharepointList1'.gender), ["Male", "Female", "Other"])
cwebb365
Level 10

Re: Load Choice values when app is opened offline

Take the datasource the drop downs are pulling from if it’s not already on the app start and put it into a collection. Then Save that collection so it can be used offline in app start. On the clearcollect on app start where you load that datasource surround by if(connected, data source, load from save file)

Then set your drop downs to pull from collection. This way you’ll have it offline and it’ll update when online.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 340 members 4,327 guests
Recent signins:
Please welcome our newest community members: