Hi, everyone,
hope someone can help me with this. Is it somehow possible to make the width of a gallery dependent on the loaded data?
SharePoint data is loaded in my gallery. A maximum of three data records are loaded in three columns. However, if there is only one or two instead of three data records for a day (display of the data records, depending on the selection in the DatePicker), I have the problem that the neighboring labels, which calculate the sum of the data from the gallery on the right Screen stuck because the gallery has a fixed width regardless of the data set loaded.
This leads to a blank space in the display. At best, it should be the case that the gallery width is dynamically dependent on how many data sets have actually been loaded.
Hope that was understandable.
Solved! Go to Solution.
galleryItems is just a temporary variable used inside formula.
formulaFromGalleryItemsProperty - is the same formula you used in Items property of gallery3.
I think that is pure math.
I imagine that the first gallery is a horizontal one. You need to set the Width property of the that gallery based on items rows number. It should look like:
With(
{galleryItems:formulaFromGalleryItemsProperty},
Self.TemplateWidth*CountRows(galleryItems)
)
I used this formula to avoid delegation warning.
And the second gallery should have the Y property set as Gallery1.X+Gallery.Width.
Hope it helps !
I thank you in advance for your help. Unfortunately I don't understand your solution. It's also the case that I'm not very familiar with PowerApps and the functional possibility.
What is "galleryItems", which property? Where does it come from? This is not recognized by me. Likewise "formulaFromGalleryItemsProperty", is that a placeholder? What do you mean by that? This also gives me an error message.
The gallery is named: "gallery3".
I hope you can make it easier to understand for a beginner.
Regards
galleryItems is just a temporary variable used inside formula.
formulaFromGalleryItemsProperty - is the same formula you used in Items property of gallery3.
User | Count |
---|---|
262 | |
110 | |
92 | |
55 | |
41 |