cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TiagoFreire
Level 8

BUGS: Some actions overwrite formulas, erasing development progress.

Hi all, 

 

I stumbled upon some problems which happened to me more than once, which I will describe. 

Those were incredibly frustrating and time-consuming, as I lost hours of work. 

 

SCENARIO: ADVANCED USE - DYNAMIC LAYOUT

 

Currently I am improving the layout disposition of objects in my Apps. 

I noticed that by letting the app use the default values, the default "scale with points" setting leads to very different layouts depending on how is the setting of "scale and character size" on Windows 10. The font and object size changes in PowerApps is simply massive - in my opinion.

 

So I need more predictability on how the app looks across devices, and also how it scales as the user works in a window of arbitrary sizes, ans as the user resizes the window during operation. 

 

To that I am replacing the literal numbers in the properties: Size X, Y, Height and Width of several objects, so that they conform to layout disposition and flow more adequate to our requirements.

 

The bug is that there are several actions that cause the app to recalculate and overwrite those values, overwriting the previous values even if they are not literal numbers. 

 

My proposed solution, then, is that certain reflow actions in the design interface only overwrite attributes for font size, position and dimension attributes if their values are literal numbers, but not if they are formulas. 

 

First Problem: Changing the  App settings - Screen Size settings will overwrite custom formulas and values when rescaling the app. I think there may be more settings in the app that cause it to recalculate object positions, but I did not do an exhaustive check. 

 

Forms: Forms really don't like custom width values. If the user changes any value of border, brackground or dimensions in the form, width custom formulas for datacards are lost, even if I am only saying "width = Parent.Width". 

Components: Changing App dimension settings in the App Settings will break formulas on attributes for size, position and dimension even inside Components. I have created a resizing circle which would have a few icons scale gracefully as it is resized as a component, and it broke, requiring to have it redone. 

Finally, a different-but-not-too-different problem. If I accidentally delete a form, and then undo the action, it is not restored faithfully. The Attributes for Size, position and dimensions for the app, datacard, and its components are restored with absolute values rather than restoring their original formulas. 

4 REPLIES 4
Super User
Super User

Re: BUGS: Some actions overwrite formulas, erasing development progress.

@TiagoFreire 

There is a similar posting in this message that sounds like what you are experiencing as well.

Unfortunately, there is no resolution on it...I would raise this up to support.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: BUGS: Some actions overwrite formulas, erasing development progress.

@TiagoFreire ,

Do you drag the control in your app after you write formulas to control the XYWidth and Height properties of a control?

 

It is an known limit when using formulas for Dynamic layout within PowerApps. The limit as below:

After you write formulas for the XYWidth and Height properties of a control, your formulas will be overwritten with constant values if you subsequently drag the control in the canvas editor. When you start to use formulas to achieve dynamic layout, you should avoid dragging controls.

Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout#known-limitati...

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout#use-formulas-f...

 

Please make sure you do not drag the control to a different location or resize the control by dragging its border.

 

In addition, when you change the "Screen size + Orientation" option, the position of the control where you use formula to control the  XYWidth and Height properties would be changed, so the formula within the  XYWidth and Height properties of the control would be overwriten with a constant value.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TiagoFreire
Level 8

Re: BUGS: Some actions overwrite formulas, erasing development progress.

No, I don`t drag the controls. I am aware that manual repositions will overwrite the formulas. 

The mere change of dimensional proportion - like going from 16:9 to a custom width / height, and saving the settings, is enough to reflow all objects and destroy the formulas not only on the core container object, such as a gallery or form, but also in all the contained components inside the gallery template, form datacards and controls inside the datacards.

As for other destructive operation, as I have said, changing the background color and border width on a form are enough to destroy the formulas as well. 

Accidental deletion and undoing also causes the same issue. 

Highlighted
TiagoFreire
Level 8

Re: BUGS: Some actions overwrite formulas, erasing development progress.

Just to complement, my understanding of a more productive behavior would be that when manually dragging a complex control such as a Gallery or Form, only the container object would have the X and Y values overwritten, but nothing else. If a control is manually resized, only the Width and Height would be overwritten. 

 

The Size property - for font size - IMO should not have formulas overwritten at all if there is an App orientation and dimensional changes - it should scale only if the value is a literal number.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,279)