web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Text input values disa...
Power Apps
Unanswered

Text input values disappear inside Gallery

(1) ShareShare
ReportReport
Posted on by 26

Hi, 

 

I am building an inventory app which needs to be able to count products stored in multiple locations.  Within the app I have a collection, a gallery and three input fields inside the gallery.  

Through PatchUpdateContext and possibly one other way to add the values entered into the text box I am able to ammend the total inventory counted.  My problem is this: 
Every time I navigate away from the field inside the gallery, my value(s) disappear.  

I have attached the code to OnSelect & OnChange; changed the default to "", [blank], false, and anything else I can think of.  Any help would be much appreciated. 

 

General Idea of App: 

In Gallery - User enters values.

Apples:  10 on the floor; 5 near cash register; 30 apples in backroom. 

Oranges:  8 on floor; 3 near cash; 100 in back room. 

 

In Collection:  

Name: / Inv: 

Apples / 45

Oranges / 111

 

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ColinM 

    Can you possibly supply a picture of your screen to get a better idea about what you are trying to put together?

    That will help in understanding the issue better.

  • ColinM Profile Picture
    26 on at

    Hi,

     

    1 - Thank you very much for your question and any help you can provide.

     

    2 -

    Please find the attached screen shot of my Collection and the Gallery. It is a bit messy as I have tried a number of workarounds, some of which are better than others.  

     

    At the top: 
    Apple:   Input Box= 12; Input Box = 45

    Code attached to each box: 

    Patch(InventoryCollection, {Name: "Apple"}, {Inv: (fridgeAppleText + ovrstockAppleText)})

    This successfully adds the values of the inventory to the collection, however, it would require me to build and rename new text input fields for each new item.  I would prefer to build a dynamic option which will display each item in a gallery.  

     

    Dynamic Solution:

    The Gallery.

    Title:  Name of Item
    Subtitle:  Inventory

    Input box 1, 2 3:  Location(s) where inventory is kept. 

     

    Code attached to OnChange of Input boxes:

    Patch(InventoryCollection, {Name: Title4.Text},{ Inv: FridgeInvTxt+OverStock2txt+OvrStock1txt})

     

    What happens:  

    Collection updates - Value in text input box disappears / reverts to default values.  I have tried to disable the default values, insert null string, assign false value.  

     

    Thanks,

    Colin

     

    @RandyHayes 

     

    Inventory Gallery.JPG
    PowerApp-Collection.JPG

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard