Problem with Update Context
Hi All!
I'm trying to subtract the value of the field "Cantidad a comprar" to Available ("30 unidades disponibles) (you can see this in the attachment). This screen works with UpdateContext, this is a formula of a template (Assets).
I try to change "-1" with:
UpdateContext({NewRecord:Patch(Products,First(Filter(Products,ProductId=ItemSelected.ProductId)),{Available:Text(If(Value(ItemSelected.Available)>0,Value(ItemSelected.Available)-Value(Value5.text),ItemSelected.Available))})});Navigate(ConfirmationScreen,ScreenTransition.None)
But it doesn't work... and I don't understand why...
I hope you can help me!