Set variable in screen by code based on other variable

I want to set a variable in my screen based on the value of another value in the screen . How to do that ?
The variable needs to be 5 * the other variable after the user has entered it.
Hi Erik,

simple add and expression on the screen and on the value set what you want, in this case 5* the other variable.
aha, not so simple. both fields are database fields. See attachment.
Hi erik pepping,

I don't understand completly what you are trying to acomplish.

However there are two ways to solve your problem depending on what you want to do.

1 - if the inputs are loaded on preparation - you can assign the variable b = 5* variable a after the query.

2 - if initially the variables are empty - on the input of variable a you can add a onchange event that executes a new action where you assign variable b = 5* variable a and then refresh the input of variable b.

Hope this helps.

Best regards.