cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
westerdaled
Helper V
Helper V

Dynamically postion a gallery within a Form DataCard control

 

I have a Power Apps form that uses a SharePoint list as a datasource.  One the fields is a multiselection choice.

Now, I wasn't sure the users would like the default behaviour of choice field in new Power App form ( they are used to old SharePoint 2010 forms with checkbox selections), so I decided to use a gallery. 

 

Here I have hidden the choice data card and tried to place the gallery on top of it  - I don't think I place the gallery control within the datacard so it is effectively just a screen control outside the form.  Now here lies the issue: how to make the gallery move up or down as I scroll the form whilst making it's position relative to Date and Employee number fields.  So far I have tried using the  X and Y values of the DataCards to the top and bottom of it, but thisn't quite there yet. 

 

Gallery in a form.png

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Community Champion
Community Champion

@westerdaled I would suggest to put the Gallery inside the Datacard (like you see in me example below). Positioning a gallery that's outside, relative to the Datacard can be very trick and could be unpredictable depending on the structure of your Form.

 

CNT_0-1622644533608.png

Hope this helps!

View solution in original post

5 REPLIES 5
CNT
Community Champion
Community Champion

@westerdaled I would suggest to put the Gallery inside the Datacard (like you see in me example below). Positioning a gallery that's outside, relative to the Datacard can be very trick and could be unpredictable depending on the structure of your Form.

 

CNT_0-1622644533608.png

Hope this helps!

View solution in original post

@CNT . Ah thanks. I thought I had tried that. Just cutted and paste the gallery into the DataCard . All good now. I has created a circuliar reference but I can deal with that tomorrow .  Thanks again.

CNT
Community Champion
Community Champion

@westerdaled Good job and Good night! 😴

RandyHayes
Super User III
Super User III

@westerdaled 

Using a Gallery in a Form Datacard produces erroneous results when referring to the controls inside of the gallery in any other formula.  You will see this in your next post!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
RandyHayes
Super User III
Super User III

@westerdaled 

I will explain how to do this properly in your other post - but I am posting here again to recap your original problem as you have now been taken down a rabbit hole.  The solution to your original post here was to put your EditForm in a scrollable Canvas Datacard.  This would allow you to scroll your form properly (as it would actually not really scroll any more - the datacard that the form is in would scroll) and keep your Gallery that is outside of the Form (where it will work) in the same position when scrolled.

 

SO...I would consider the simplicity of this solution over the complexity that will now be needed by placing the Gallery in the Form datacard.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,814)