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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,074)