cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
westerdaled
Post Patron
Post Patron

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
Super User
Super User

@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
Super User
Super User

@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!

@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.

@westerdaled Good job and Good night! 😴

RandyHayes
Super User
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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 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,194)