Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Gallery format that allows updates

I am trying to create an inventory sheet.  1st screen allows them to pick where they are doing the invenotry.  2nd screen show the items in a list format (gallery) and a quantitiy field for them to fill out.  I can't seem to get the quantity field to be updatable in that list  format. Does anyone have any suggestions and if so any sample code?  I am new to this applicaiton.

Advocate III
Advocate III

Re: Gallery format that allows updates


What's your datasource?  I would download f.i. SiteInspection demo app, and learn from that. If you give some more input (screen shots etc), it would be easier to give you a direction and/or solutions to this...  🙂

Community Champion
Community Champion

Re: Gallery format that allows updates



Are you using EditForm? If yes, then there should be a field to fill in.

If you are using normal TextInput, then you shall use

- Patch(TableX, Defaults(TableX), {FieldTitle: TextInput.Text,...}) - for New Records or

- Patch(TableX, ContextVariable, {as above"), where ContextVariable is brought over from previous screen which you may write lie this:

- OnSelect (of any gallery items) = Navigate(Screen1, Fade, {EditX: ThisItem}), whre EditX is any name assigned as a ContextVariabe.


Hope this helps.

Power Participant
Power Participant

Re: Gallery format that allows updates

I have managed to do what you need, the juice is in the last three steps.


Say your data source is Test_transactions which has three colums:

  1. Locations: A text or choice column with the name of the location
  2. Title: A text or choice column with the name of the widget (inventory item)
  3. Inventory_amount: A number column with the number of items in inventory for that widget for that location

Create a new blank app


Rename the first screen Locations and create a second screen and rename it Inventory_edit


Connect your data source, it should be automatically called Test_transactions


Here are the essential steps with the screen Locations

  1. Insert a vertical custom gallery and change its name to Gallery_locations
  2. Set its Items property to GroupBy(Test_transactions, "Locations", "AllItems")
  3. Insert in the gallery a text box and change its name to TextBox_location
  4. Set its Text property to ThisItem.Locations
  5. Insert in the same gallery a right-arrow shape and set its OnSelect property to Navigate(Inventory_edit, Transition.None)

Here are the essential steps with the screen Inventory_edit

  1. Insert a back arrow shape and set its OnSelect property to Back(ScreenTransition.None)
  2. Insert a vertical custom gallery
  3. Set its Items property to Sort( Filter(Test_transactions, Locations = Gallery_locations.Selected.TextBox_location.Text), Title)
  4. Insert in the gallery a text box and set its Text property to ThisItem.Title
  5. Insert in the gallery a text input control (not a text box), it should be called TextInput1 by default
  6. Set the Default property of TextInput1 to ThisItem.Inventory_amount
  7. Set the OnChange property of Textinput1 to Patch(Test_transactions, ThisItem, {Inventory_amount: Value(TextInput1.Text)}) 

This lacks the check if TextInput1 is numerical (if it isn't then the record will not be updated, assuming Inventory_quantity is of numerical type, but no error will be thrown) and if any other errors in connection happen etc. but you can add those as described in other posts and articles.


Please let me know if this works and if so please mark as answer.


See screenshots below...








PS hpkeong's answer also works, but it requires the opening of each item in an edit form.  As of today it does not seem that you can add edit forms as elements of a gallery

Helper I
Helper I

Re: Gallery format that allows updates

OMGosh I am sooo excited - I can' wait to try this out!!!!


Unfortunately I just finished volunteering at a Red Crosss shelter all night and will have to work on this later tonight..... this is sooo cool  


Thank you sooo much.  I will report back when done tomorrow.  Smiley LOL

Helper I
Helper I

Re: Gallery format that allows updates

I finally go to stop and read and If I undertand the comments right they still have to click on each one.  Is that correct?
Im still trying to do this but I am very VERY GREEN and its taking me along time

Helpful resources

Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,575)