Problem with Update Context

Rojas Diaz, Laura Marcela 1 Reputation point
2021-05-26T00:03:46.2+00:00

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!

99599-imagen-sin-titulo.png

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
4,042 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.