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

Rearrange datafields

Hi there,

 

I am building an app for a client and we have come to a point, where they want to rearrange some of the datafields on some of the screens.

Now I was thinking, this should be and easy matter, but boy was I wrong.

 

As it turns out, trying do accomplish this is absolutely nerve-racking and I have more or less come to the conclusion that it can't be done. 

All I am trying to do, is move and set the fields in my app, where ever I want them to be in the app, but there is just no way to do it. I tried doing it with configuring the X and Y axis directly, but is just not a good way to do this and it doesn't really work anyway.

I know a lot of others seem to have the same problem, but can't seem to find anyone that has found an actual solution to this.

Any ideas anyone?

 

Best regards,

Michael
 

13 REPLIES 13

There is also another method that I use, and I don't usually see random re-arrangement with it.

I set the number of columns to a large number

I set the widths of the items to :

(Parent.Width-30)/X

X can then be used to define the 'column width'

 

So if I want three columns, I set those three cards to (Parent.Width-30)/3

..or if I want 1x 2/3width card and 2x 1/3width cards set them to:
(Parent.Width-30)/3*2

(Parent.Width-30)/3*1

(Parent.Width-30)/3*1

 

The key here is to have the Parent.Width-30, as the reason the form keeps arranging itself is when one of the items touches the edge it tries to edge-fit them and the whole thing goes nuts. With this method, as long your cards are less than the total form width it allows you to drag-and-drop fairly easily.

 

Additionally, lets say you set number of columns to 4, and then try create the example above of 3 columns, then you'd do the same step that @WarrenBelz suggested of adding a blank empty custom DataCard, except instead of setting it to 1px height I usually just set it to hidden to allow it to be unhidden and dragged around later if needs be.

 

 

There's also an additional 'hack' that I've been working with recently which is a bit fiddly to set up but essentially allows you to place things wherever you want, but does add a bit to the amount of configuring of each item - I'll have a blog going up about this sometime soon.

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Wow, what an excellent tip! Thanks Sancho 🙂

Thanks @iAm_ManCat ,

Some interesting concepts there.

I guess I was a bit focused also on the fact that I have very uneven width cards in my forms, so the formulas would drive me mad. Also I shade every second line, so the total widths has to equal the form width (although the -x width also has possibilities). It is great to share these little things that challenge us.

Happy to help!

 

@WarrenBelz I'm glad you mentioned the alternate colouring, as that won't be an issue

 

What I'm doing is taking the total width and subtracting 30, then dividing that into sections, so as long as your sections add up to your total divisor then the gap on the end is always 30.

 

And if you want your cards to be edge-to-edge against the edge of the canvas, then just make your Gallery.X size 30 larger - this won't affect the drag-and-dropping and will make the edge seamless by making the gallery go 30 over the edge of the screen (assuming you are talking about edge-matching).

 

And if you want to get super granular about the widths, you could divide it by 50 or any number theoretically, like maybe use 100 so that you could think of it like percentages:
you divide that (Parent.Width-30) by 100

you have one column that you want at '33%' width, so you times it by 33

then you have another column that's 12 wide, so you times it by 12

then you have another that's 47 wide so you times by 47

then you have a final card that's 8 wide

=100 width used of the 100 you divided by

 

So your total 'width used' from the number you divided by is now equal and will equal (parent.width-30), so the columns always end up the same width in total - I have all my forms match their right-hand edges so that it's flush.

 

Hope that helps!

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (45,162)