Hello everybody,
I’m building an app using Power Apps Studio, which is connected to a Microsoft List. The app was auto-generated, and I’ve made some modifications.
I’m trying to create a formula that allows me to update the quantity (Kolicina
) of a specific item in the list based on an ID
entered by the user. However, I keep running into issues, and I’d appreciate your help.
Here’s what I want to achieve:
ID
and a quantity to subtract
.ID
in the list.Kolicina
field for that item by the entered quantity.Here’s my formula:
Patch(
Offcut,
LookUp(Offcut, Ident = Value(Ident_DataCard2_1.Default)), // Find the item by ID
{ Kolicina: Kolicina - Value(Kolicina_DataCard2_1.Default) } // Update the quantity
)
Offcut
is the name of the list.Ident
is a column in the list (it’s supposed to be numeric).Kolicina
is a numeric column that stores the quantity.Ident_DataCard2_1.Default
is the user input for the ID
.Kolicina_DataCard2_1.Default
is the user input for the quantity to subtract.What I’ve tried:
Ident
is numeric by using Value()
.Ident_DataCard2_1.Default
and Kolicina_DataCard2_1.Default
to debug.LookUp
to directly match Ident
without Value()
.Any guidance would be greatly appreciated! 😊
Thank you in advance!
Patch(
Offcut,
LookUp(Offcut, Ident = Value(Ident_DataCard2_1.Text)),
{ Kolicina: LookUp(Offcut, Ident = Value(Ident_DataCard2_1.Text)).Kolicina - Value(Kolicina_DataCard2_1.Text) }
)