Showing results for 
Search instead for 
Did you mean: 
Not applicable

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


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



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

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

Not applicable

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

Not applicable

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

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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