Announcements
Hello all,
I want to change the item size (WrapCount) of a vertical gallery based on user input and button click. I would think that you could do that by using button's OnSelect method with something like this: Gallery.WrapCount = Value(TextInput.Text) but Gallery.WrapCount property doesn't seem to be accessible outside of gallery itself. Any ideas?
@Anonymous
You cannot assign values to a property like that in PowerApps. PowerApps is a no-code platform and derives its values from formulas, much like Excel. Just as in Excel, you would not try to set some other cell to a value, instead you would put a formula in the other cell to derive its value from the first.
That said...the Gallery has a WrapCount property. In that property you can (given your above scenario) set the property to the following formula : Value(TextInput.Text)
When TextInput is changed, the Gallery will change its wrap count based on that value entered.
I hope this is helpful for you.
It's not exactly what I'm looking for but maybe it can be useful for future as a work-around solution. Thanks!
@Anonymous Can you describe more about what you are looking for then? This is the only what you can set properties in PowerApps.
If it is that you want this to be based on a button, then you can take a snapshot of the value in the textinput and use that.
For example, in the OnSelect of your button - UpdateContext({lclWrapCount:Value(TextInput.Text)})
Then in the WrapCount of the Gallery, the following formula : lclWrapCount
This exactly what I needed. Thank you!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 345 Most Valuable Professional
11manish 207 Super User 2026 Season 2
Mohsin Ali 177