cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PowerApp access Dynamics 365 data on form but have offline mode.

Hello,

I just started working with PowerApps last week. I was able to create an Events Lead app to collect data we need and feed our Dynamics 365. We like the options and that we could prefill some data fields. We believe we can collect data quicker then Dynamics Quick Create form.

I have been able to make the phone app and create an online only version. I was even able to take the phone version and convert it to a tablet version with some information I found. My problem is now I would like to look at an offline mode. I figure conventions can have hit or miss signal. Not waiting for a good connection may be best. 


I found articles on using a collection to capture offline data https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps . I have been unsuccessful getting the collection to work with our data. I was using an editform with SubmitFrom()

If( Connection.Connected,
    SubmitForm(Form1_1),
    Collect( LocalEventLeadsToPost, Form1_1 );
        SaveData( LocalEventLeadsToPost, "LocalEventLeadsToPost" )
);

I believe this is where I may have to make a change or possibly something on each datacard. 

 

Thank you,

 

Brant 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @Anonymous ,

Do you want to save your form data into the collection ('LocalEventLeadsToPost' collection) when the connection miss signal?

 

Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please modify your formula as below:

Set the OnSelect property of the "Submit" button to following:

If(
Connection.Connected, SubmitForm(Form1_1), Collect(LocalEventLeadsToPost, Form1_1.Updates); /* <-- Modify formula here. Please type Form1_1.Updates formula */ SaveData(LocalEventLeadsToPost, "LocalEventLeadsToPost") )

Then if you want to load the cached file into a collection within your app, please take a try with the following formula:

LoadData(LocalEventLeadsToPost, "LocalEventLeadsToPost", true)

More details about SaveData and LoadData function in PowerApps, please check the following article:

SaveData function and LoadData function

 

More details about creating an offline app within PowerApps, please check the following video:

https://www.youtube.com/watch?v=aIwbcCag9B4

 

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.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

HI @Anonymous ,

Do you want to save your form data into the collection ('LocalEventLeadsToPost' collection) when the connection miss signal?

 

Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please modify your formula as below:

Set the OnSelect property of the "Submit" button to following:

If(
Connection.Connected, SubmitForm(Form1_1), Collect(LocalEventLeadsToPost, Form1_1.Updates); /* <-- Modify formula here. Please type Form1_1.Updates formula */ SaveData(LocalEventLeadsToPost, "LocalEventLeadsToPost") )

Then if you want to load the cached file into a collection within your app, please take a try with the following formula:

LoadData(LocalEventLeadsToPost, "LocalEventLeadsToPost", true)

More details about SaveData and LoadData function in PowerApps, please check the following article:

SaveData function and LoadData function

 

More details about creating an offline app within PowerApps, please check the following video:

https://www.youtube.com/watch?v=aIwbcCag9B4

 

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.

View solution in original post

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 (106,515)