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."

View solution in original post

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,873)