So, if I put the above code on the "On User input" field action of the Valor_total field, it field is not updated after entering values on Valor, Juros, Multa and Desconto, with the result of the calculation, because it is the "last field", I think.
I only got to make the calculation putting the above code on "On add - Validate" and "On add - Success" form actions.
What I need to do is that Valor_total, in the form, be the result of Valor + Juros + Multa - Desconto.