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

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.

@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.
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.
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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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