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.
Any ideas?
Solved! Go to Solution.
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."
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."
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}
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."
User | Count |
---|---|
133 | |
132 | |
97 | |
75 | |
74 |
User | Count |
---|---|
206 | |
196 | |
70 | |
60 | |
52 |