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

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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (82,357)