how to increment a counter variable based on a specified condition

how to increment a counter variable based on a specified condition

  
Hi All,

I have a requirement  in my project. I have  counter variable which need to increment whenever a specified condition(If condition) is satisified and then i need to add the corresponding values into a collection object like ex:List<T> in .Net.How can we achieve this in outsystems.


Thanks,
Prashanth
Hello Prashanth

I don't know if I understood your question, but to achieve something like that you can use some components from Forge that can handle that kind of data structures:
http://www.outsystems.com/forge/Component_Detail.aspx?ProjectId=177&ProjectName=extension-hashset

http://www.outsystems.com/forge/Component_Detail.aspx?ProjectId=21&ProjectName=extension-hashtable

Hope this helps.

Kind Regards,
GM
Hi Prashanth,

You can do that by using the flow editor with If and Assign nodes, and a ListAppend action. 
I've built a small example, and you can check how you can use this on real applications in our Academy, here's an example of the ListAppend. For other situations, you can also use our components as Gonçalo was stating.

Hope this helps. If you still have doubts, keep them coming ^_^


Cheers,