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

False value on Collection

Hi all,

I want to save offline forms when there's no connection. At my form screen I have the following code when submit button is pressed: 

If( Connection.Connected,
    SubmitForm(Form1); Navigate([@'Success Screen1'], ScreenTransition.Fade),
    Collect(Collection1, SubmitForm(Form1));
    SaveData(Collection1, "offlinesave");
    Navigate([@'Success Screen2'], ScreenTransition.Fade)
)

Then, I have a screen in which I expected to display this forms that were saved offline at the collection. This thorugh a table. But first, instead of showing me the columns for each form value it displays only a 'Value' column. Then they always appears as false (I suppose that if Value of a object in a Collection then object content should be blank or null). 

Screenshot_20190718-094903.pngI wonder why is that happening, or if I'm doing something wrong, any suggestion is welcome and appreaciated in advanced! 

 

 

2 REPLIES 2
Super User
Super User

Re: False value on Collection

I believe the issue is with "Collect(Collection1, SubmitForm(Form1));"

Can you try "Collect(Collection1, Form1.Updates);"

 

SubmitForm isn't going to work offline, so you need to save the changes in the form to the collection to be saved off-online. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: False value on Collection

Hi @fmigg ,

Based on the formula that you mentioned, I think there is something wrong with it.

 

If there is no connection when you run app, when you click the "Submit" button, the SubmitForm(Form1) formula would not be executed successfully. In other words, the SubmitForm(Form1) formula would return an error.

 

I have made a test on my side, please consider modify your formula as below:

If( 
Connection.Connected, SubmitForm(Form1);Navigate([@'Success Screen1'], ScreenTransition.Fade), Collect(Collection1, Form1.Updates); /* <-- Modify your formula here */ SaveData(Collection1, "offlinesave"); Navigate([@'Success Screen2'], ScreenTransition.Fade) )

More details about the Updates property of the Edit form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-form-detail#key-proper...

 

Please take a try with above soution, then check if the issue is solved.

 

Best regards,

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

Helpful resources

Announcements
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: 49 members 4,866 guests
Please welcome our newest community members: