cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
A8Tony
Helper I
Helper I

Working with Sharepoint

OK guys, so I'm working with a sharepoint site, which has multiple lists some of which have lookups to other tables. Essentially it's a time-tracking app I'm building which has tables such as:

 

Company,

CompanyContact (lookup to company),

Tickets (lookup to Company and CompanyContact),

Ticket Activity (with a lookup to the Ticket ID).

 

I'm not asking about functionality between them as I'm working that out quite nicely with the help of some amazing YouTube content :).

 

What I am interested in though is the refreshing of data, and how that works/should be instigated?

 

So my questions are:

1. If I bring everything into a collection, I am at the moment, should I just update that collection and will PowerApps then push that data change/addition back to Sharepoint?

2. If I patch Sharepoint do I then need to use a ClearCollect function to update all of my collections (my assumption at this point is 'Yes').

 

It is also my educated guess that if I use a collection as the source for an Edit form this only pushes the data to the collection too, so the links to/from Sharepoint and how they work becomes more important for me to understand.

 

Or am I missing something fundamental?

 

Thanks for any help with this 🙂

4 REPLIES 4
WarrenBelz
Super User
Super User

@A8Tony ,

Fairly broad question, but your last assumption is correct. A Collection only exists in the App for the time the App is running. If you want to "put it back", you need to do this proactively with Patch.

And yes, you do need to refresh collections if you change something in the data source.

 

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.

 

Thank you for the reply @WarrenBelz .

 

So, in your experience is it best to work with a collection in PowerApps and then patch back to Sharepoint?

 

Or would you submit back to Sharepoint, and then refresh your collections every time a record is submitted?

Forgive the newbie questions, but I'm currently working on an app and it seems there's potential for a lot of repetition if I'm refreshing many collections each time I create/update a New Customer/Ticket/Ticket Activity.

@A8Tony ,

Very broad question and depends on what you are doing and your priorities.

Collections are certainly is better for performance (particularly on mobile devices) and avoid Delegation issues (but is limited in their size by the same issue). If you can submit directly to the data, this saves a "step" in the process and viewing the data directly is certainly the "point of truth". Bear in mind also that a collection only exists in the Session and is not "real data" until written to the source. They are however good for temporary storage of data (again for performance) prior to writing to the source. I also use them for drop-down values.

In essence, the model depends on the intended use.

 

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.

@WarrenBelz Thank you for your input. It genuinely is appreciated.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,935)