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.

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.

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.

View solution in original post

Thanks, that's what I was looking for 🙂

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

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

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (16,894)