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

Value on InputText in Gallery won't change

Hi,

 

I have gallery created from DB as collection.

One column in galery I set as "Text Input" and set value from collection to Default = ThisItem.Qty;

But when I change value in this field I see that on screen is new value, but in a collection is the same old value. I don't know why this walue won't change 😞

When I check collection, in Qty fields are the same old values 555 in first row and 666 in second row. But should change to 454 and 345. When I set in OnChange property: Notify(ThisItem.Qty);  I see also old value.

1.PNG

Any ideas?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Value on InputText in Gallery won't change

@Pablo2 

I agree, ThisItem.Qty is the issue.  ThisItem.Qty looks in the database for the value.  You will want to reference the Text Input control instead and get the quantity from there.

 

Replace this code

Patch(MyCollection, ThisItem, {Qty:ThisItem.Qty})

 

With this code

Patch(MyCollection, ThisItem, {Qty: Value(your_textinput_name.Text)})

 

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Value on InputText in Gallery won't change

@Pablo2 

What code is currently in the OnChange property of your gallery text input?  If you want the collection to be updated you have to use the PATCH function to change the values in the collection.  Simply writing new values in the text box will not change anything in the collection.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Pablo2
Level: Powered On

Re: Value on InputText in Gallery won't change

But what should be there? I have try with:

Patch(MyCollection, ThisItem, {Qty:ThisItem.Qty})

 

but it doesnt work. I think that problem is with ThisItem.Qty in {Qty:ThisItem.Qty}

Super User
Super User

Re: Value on InputText in Gallery won't change

@Pablo2 

I agree, ThisItem.Qty is the issue.  ThisItem.Qty looks in the database for the value.  You will want to reference the Text Input control instead and get the quantity from there.

 

Replace this code

Patch(MyCollection, ThisItem, {Qty:ThisItem.Qty})

 

With this code

Patch(MyCollection, ThisItem, {Qty: Value(your_textinput_name.Text)})

 

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

Highlighted
Pablo2
Level: Powered On

Re: Value on InputText in Gallery won't change

You were right. Thanks 🙂

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,968)