20
Views
2
Comments
Solved
sum of values ​​within input
Application Type
Traditional Web

Hello friends, I'm learning Outsystem and I'm having difficulty here, I hope you can help me. Could you explain to me how I can do a simple calculation?

 Ex: 

the value that is in input2 * what is in input3, but the calculation has to be done when I press the tab on the keyboard in input3, that is, when input3 loses focus. the result must be shown in input4



2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Everyone seems afraid to answer a question about Traditional :)

Here are both solutions.

In Reactive I did onblur and onfocus, so it shows/hides every time you exit/enter the Valor input.

Then the action calculates if there is a value to show or if it is blank. Note that I'm using a text variable for the result so I can show empty string. If I picked a numeric type, it would show 0.

In Traditional, it is the same logic, but I simply added a button to call that action and on the input element defined JavaScript to click on the button, thus calling the action. Andmade the button invisible on screen.

You can do the same for onfocus if you need to.

Reactive.oml
Traditional.oml
2024-12-27 12-36-58
Ubirailton Britto

OK!!!

Thank you very much, that's exactly what I needed, it helped me a lot

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.