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.
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.
H @TiagoFreire ,
Do you drag the control in your app after you write formulas to control the X, Y, Width 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 X, Y, Width 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:
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 X, Y, Width and Height properties would be changed, so the formula within the X, Y, Width and Height properties of the control would be overwriten with a constant value.
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.
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.
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand