cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Release 3.20021.27: Component instances lose property definitions in Studio

As of release 3.20021.27 (yesterday), controls which are instances of a Component have lost several properties including X, Y, Height, Width, and any Fill or Color definitions when viewed in Studio. They all bunch to X=0, y=0, for example, despite individual X and Y settings still showing their correct values. The app plays in Player OK, however.

 

I can sort of cure this by selecting all controls on a given page, cutting them, and then pasting back (so CtrlA, CtrlX, CtrlV). They then show correctly in Edit mode in Studio, but lose their values again when I hit Preview (F5).

 

If I save the app in this state and publish it, all controls show correctly. So it seems the Studio application is failing to implement properties in Component instances - they are probably defaulting to the sample settings within the Components themselves, I guess.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Release 3.20021.27: Component instances lose property definitions in Studio

Yes, @Eickhel, agreed! Got to the same conclusion after a day experimenting..

If, as is often recommended, you typically create a global variable in the OnStart event to define styling properties - say,

Set(
gStyles,
  {
    marginX: 50,
    headerY: 35,
    ctrlFill: RGBA(200,200,200,1) //etc etc
  }
)

and then use this to define properties in Component instances, they now fail, as of release 3.20021.27. Other non-Component controls are still ok.

Bizarrely, local variables created within the page's OnVisible event still work OK. So if your Component instance's X needs to be marginX, you can add this to its screen's OnVisible event

UpdateContext(
  {
    Styles: gStyles
  }
)

set your Component instance's X to Styles.marginX, and all is fine.

So, Microsoft, is this now a permanent feature, or are you going to restore the ability to use global variables with Components?? Do I start remaking apps, or wait for a fix?

 

View solution in original post

6 REPLIES 6
Eickhel
Level 8

Re: Release 3.20021.27: Component instances lose property definitions in Studio

I'm having the exact same issue:

  • The component is losing it's X value even though the formula's result is 210. 

2020-02-16_14-18-57.jpg

 

Super User
Super User

Re: Release 3.20021.27: Component instances lose property definitions in Studio

@Eickhel @JonathanGibbs 

I also had an issue with the components losing their X & Y properties while on mobile but received no response

 

Link To My Original Post:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Components-Display-In-Different-Positions-Wh...

 

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

Highlighted
Eickhel
Level 8

Re: Release 3.20021.27: Component instances lose property definitions in Studio

Ok, I think I've narrowed it down to something... I don't know if it's the same exact case as the others but if any properties of the component comes from a public variable ( Set ) it doesn't stay. If the property comes from a local variable ( UpdateContext ) or a Collection it works and the values stay after saving and opening again.

 

Hope it helps

Re: Release 3.20021.27: Component instances lose property definitions in Studio

Yes, @Eickhel, agreed! Got to the same conclusion after a day experimenting..

If, as is often recommended, you typically create a global variable in the OnStart event to define styling properties - say,

Set(
gStyles,
  {
    marginX: 50,
    headerY: 35,
    ctrlFill: RGBA(200,200,200,1) //etc etc
  }
)

and then use this to define properties in Component instances, they now fail, as of release 3.20021.27. Other non-Component controls are still ok.

Bizarrely, local variables created within the page's OnVisible event still work OK. So if your Component instance's X needs to be marginX, you can add this to its screen's OnVisible event

UpdateContext(
  {
    Styles: gStyles
  }
)

set your Component instance's X to Styles.marginX, and all is fine.

So, Microsoft, is this now a permanent feature, or are you going to restore the ability to use global variables with Components?? Do I start remaking apps, or wait for a fix?

 

View solution in original post

Power Apps Staff Mr-Dang-MSFT
Power Apps Staff

Re: Release 3.20021.27: Component instances lose property definitions in Studio

Hi @JonathanGibbs @Eickhel @mdevaney ,

A fix was rolled out earlier today if you can check that components are working for you now.

Re: Release 3.20021.27: Component instances lose property definitions in Studio

@Mr-Dang-MSFTYes, now OK again.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,917)