cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Is there any way to programmatically spawn in controls?

In our app, we have circles that we associate with records in a table. What I'm doing currently, is having 200 circles on the screen, and then storing all of the records into a collection. And what I then do is, for every circle, check if the number of items in the collection matches their number. So circle40 will look if there is a 40th record in the collection, if there is, it is visible, if not, it invisible. 

But the issue with this is that we always have 200 circles no matter how many records there are. Is there a way in PowerApps, to programmatically spawn circles and then assign values to certain properties like X, Y, Height, Width and OnSelect etc.? Or is there a way to clone a circle and then assign its properties values?


If it is not possible, that's fine. I just need to confirm. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Mgodby 

You can't really do that in PowerApps.  You'd have to have them all in your app.

They can all be dynamic based on properties...so, for example, if you had a table of records with some value, an X a Y, Height and Width, and then based your circles off of that AND, if something like the value was 0 (or something else) then you could set the Visible to false.

 

I am assuming your circles are random (or to some pattern) on the screen and not linear and can be part of a Gallery.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@Mgodby 

You can't really do that in PowerApps.  You'd have to have them all in your app.

They can all be dynamic based on properties...so, for example, if you had a table of records with some value, an X a Y, Height and Width, and then based your circles off of that AND, if something like the value was 0 (or something else) then you could set the Visible to false.

 

I am assuming your circles are random (or to some pattern) on the screen and not linear and can be part of a Gallery.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Yeah for the properties I get the item from the collection and then set the properties for the circle. So circle 22 gets the 22nd item in the collection's values set for X and Y for example. Thank you. I just wanted to confirm that this was impossible since I already kind of assumed it was.  

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,920)