How can I change the value of a input field with icons?

The icons left and right needs to change the input field how can I do this? The icons has a link and both a new screen action but I dont know what to do in the screen actions.

Hi Halit,

On that screen action you need to manipulate the variable linked to that input in the way you want and than use ajax refresh to refresh the input.

Maybe check this training.

Regards,

Marcelo

Hi Halit,

In your screen actions, you can add and subtract the value of your input with an Assign, and then refresh it with an Ajax Refresh action.

If you want to change the value of the input field only with the icons, you should consider disabling the input. As for what to do in the actions, you should create an assign that would have va1= va1 - or + 1, being var1 the variable associated with the input field, after that, you need to refresh the input using an ajax refresh. Note that you need to name the input in order to be able to use the ajax refresh.

Does this help?

Halit Ozdogru wrote:

The icons left and right needs to change the input field how can I do this? The icons has a link and both a new screen action but I dont know what to do in the screen actions.

Hi Halit Ozdogru

You must assign a new value to the variable of the input in each of the actions.

if you click the "bigger" icon you must increase your variable value, if you click the "Smaller" icon you must decrease your variable value. In both cases, after changing the value of the variable you must refresh the input element.

This is basic knowledge, you should folow this link and do the tutorials -  https://www.outsystems.com/learn/paths/2/becoming-a-traditional-web-developer/

Best Regards

Rodrigo Henriques

Hi Halit,

You need to follow below steps

1. Bind your input field to an integer type variable, let say the variable name is "InputVar"

2. Add separate client actions for both left and right icons.

3. In Left icon client action add an assignment operator like " InputVar = InputVar - 1", and then add AjaxRefresh widget to refresh the input field. This would decrease the displayed value by 1.

4. In Left icon client action add an assignment operator like " InputVar = InputVar + 1", and then add AjaxRefresh widget to refresh the input field. This would increase the displayed value by 1.

Thanks,

Junaid