cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonathanGibbs
Resolver I
Resolver I

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

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
MVP

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

 

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

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

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

Hi @JonathanGibbs @Eickhel @mdevaney ,

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

@Mr-Dang-MSFTYes, now OK again.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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,613)