572
Views
6
Comments
Solved
Increment local variable's value on button click
Application Type
Reactive


Hi 

I am new to Outsystem and learning it.

I just can't understand on button click how can I increment the local variable's value.

For your reference, I was going through Courses. And in that, i am not understanding above thing in (Demo: How to Use a If Widget ). Here they have not specified how local variable's value is changed on button click.


Thanks.



2022-02-07 08-52-30
Pranav Pandey
Solution

Hi Puja, 

Just use an assign and increment the value there 

val1=val1+1

See the screenshot for reference 

Capture.PNG
UserImage.jpg
Puja Banugaria

Hi Pranav,

Thank you for your quick response.  I've tested according to your sent image and it worked. 

Thanks for your help.


UserImage.jpg
Mahalakshmi GA

Hi Pranav ,

I assigned and incremented the value but I am geting warning message and even after clicking Publish the value is not decrementing. Please help. Thanks in advance


IfwidgetLocalvar.PNG
2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Mahalakshmi,

Welcome to OutSystems :)

As highlighted in the below image, you missed some basic implementation. I would highly recommend you to start with the Reactive Web Application Learning Path: https://www.outsystems.com/training/paths/18/becoming-a-reactive-web-developer/

  • The defined screen action, i.e. decrement, is not mapped as the Button OnClick event (see the highlighted warning message)

  • And also, the assignment node within the decrement action flow is incorrect, i.e. it should be value = value - 1

    Refer to the attached .oml file


As the Tool is very new for you, I suggest you start learning from the beginning. Follow the available online learning video courses, Documentation, Community post, webinar, Tech talks etc...

https://www.outsystems.com/training/courses/

https://www.outsystems.com/training/paths/


Enjoy learning :)


Kind regards,

Benjith Sam

RWALabDecrementValueDemo.oml
UserImage.jpg
Mahalakshmi GA

Thanks for the quick response sir and brief explanation for muy understanding.

Thanks,

Mahalakshmi GA

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Mahalakshmi.

Glad to help you :)


Kind regards,

Benjith Sam

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