Is there a widget in Mendix for incrementing an integer?

0
Hi,  I was wondering if there was a widget like the picture below that one can use to increment an integer? or would it be just as easy to do this with two microflow buttons? if so, what would be the best way to do this?  would also be great if it was possible to customize it so one click could add or subtract mutliples. 
asked
2 answers
1

Hi Didrik,

I wouldn't use a widget for this. Just place the input field in a flex container with the buttons next to it. For better performance, you might want to try with nanoflows as this could well be client-side functionalitalty. 

In the nanoflows, just pass the input parameter, do an empty check and increment the right attribute +1 or -1 (or whatever steps you need)

answered
1

Best is to have two separate microflows OnClickPlus and OnClickMinus  

You change the retrieve the object, change the attribute, add or subtract (with commit) and refresh.

answered