cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ColinM
Level: Powered On

Text input values disappear inside Gallery

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

 

 

 

2 REPLIES 2
Super User
Super User

Re: Text input values disappear inside Gallery

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
ColinM
Level: Powered On

Re: Text input values disappear inside Gallery

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 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,678)