cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KickingApps
Skilled Sharer
Skilled Sharer

Components and collection warning

Greetings,

 

I opened an app I after setting on the shelf for a while and am now receiving the following warning:

'formula within canvas component manipulates collection...'

 

Anyone know why this throws a warning?

 

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@KickingApps 

Canvas components do not current support the use of Collections.  You might not have received a timely warning about this because the app would have been in experimental/preview mode when you first built it.  Early access starts in Feb 2020 and general availability is in April 2020.

 

Untitled.png

 

Link To Documentation:

https://powerapps.microsoft.com/en-us/blog/components-available-in-preview/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

6 REPLIES 6
mdevaney
Super User
Super User

@KickingApps 

Canvas components do not current support the use of Collections.  You might not have received a timely warning about this because the app would have been in experimental/preview mode when you first built it.  Early access starts in Feb 2020 and general availability is in April 2020.

 

Untitled.png

 

Link To Documentation:

https://powerapps.microsoft.com/en-us/blog/components-available-in-preview/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Ah - that makes sense.  Thanks for the quick reply.

Any updates on this? It's almost may already. I've run into issues patching/updating collections inside a component

Update: Seems like collections are semi-supported after all in Components contrary to the documentation!

 

In the OnReset property I have the following formula (TreeData is an input variable of type table):

ClearCollect(ComponentTmp; Component1.TreeData)

 

It gives a warning, but the ClearCollect works! After this I can use Patch and UpdateIf like normal, except that it also give a warning 🙂 It's funny that Collect, ClearCollect, Patch and UpdateIf doesn't show up in the formula auto-complete, but it still works 🙂

 

@mdevaney 

 

I've created a component in my app that accesses a collection define within the app. Works perfectly. I want to now put that component into a component library, assumption being that the collection must exist in any app that wants to use it. Is this possible or does the component need to continue to reside only in my app.

 

Thanks!

@mike528 
How does it access the collection from your app.

 

Does it take the collection as a 'Table' type Input property?  If yes, then in your new app you will need to pass a Table with a similar structure into component with different values as needed.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

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

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (5,359)