cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YAYA
Helper I
Helper I

Gallery and Form dynamic Y Positioning

Hi,

I have a summary form pops up before submitting the form. this summary includes forms and galleries where the user filled in and requested.. my issue is how to make Y position dynamic for each gallery and form if one of them is blank the next gallery or form took its place and avoid white spaces between galleries and forms in the summary page. 

the user sometimes request only one thing of many. in the summary form i need only this one to be on top instead of its fixed Y position.

 

I have tried this but didnt work!

GalleryA.Y = GalleryB.Y +20

but even if GalleryB is not visible still reserving its position!

 

 

Thanks

tempsnip.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @YAYA ,

 

An easy way to adjust controls is putting them in a Canvas control, you could add a Scrollable screen and find it.

35.png

 

Then you could add Forms and Galleries into each Data Card (you will have to cut and paste since Galleries or Forms could not be put into Data Cards directly):

36.png

 

So here you can set Visible of the Data Cards instead of Galleries and Forms, if Visible of a Card = false, then the whole Card would not only invisible but also disappear from the Canvas, all cards below would elevate and cover it.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-jefferni
Community Support
Community Support

Hi @YAYA ,

 

Please try:

GalleryA.Y= If(!GalleryB.Visible,GalleryB.Y,GalleryB.Y+GalleryB.Height)

 

Code explaination:

If Gallery B is hidden, Gallery A would share the same Y with it so Gallery A will cover Gallery B, if Gallery B is visible, Gallery A would locate below Gallery B.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks for your help, ya this works if in the summary form only two galliereis. 

 

My Scenario is I have the a sequence as following: 

Form-1

Form-2

Gallery-A

Gallery-B

 

Lets say the user only filled in Gallery-B. so in the summary I don't need Form-1, Form-2 nor Gallery-A and those will be invisible. so Gallery-B should take the place of Form-1.

v-jefferni
Community Support
Community Support

Hi @YAYA ,

 

An easy way to adjust controls is putting them in a Canvas control, you could add a Scrollable screen and find it.

35.png

 

Then you could add Forms and Galleries into each Data Card (you will have to cut and paste since Galleries or Forms could not be put into Data Cards directly):

36.png

 

So here you can set Visible of the Data Cards instead of Galleries and Forms, if Visible of a Card = false, then the whole Card would not only invisible but also disappear from the Canvas, all cards below would elevate and cover it.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks, that's what I was looking for 🙂

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,077)