Hi, I want to increment an attribute of an entity by clicking at a link, but I don't know do I plus one to it before I modifie the entity with the new value. Someone can help me?
Hi,
to increment an attribute of an entity you can use a Math Component, you can refer to the article of the knowledge base http://wiki.webratio.com:8081/knowledgebase/article/How-to-use-Math-Unit.
Otherwise, you can use a groovy script where you plus one to a previous value, you can refer to the article of the knowledge base http://wiki.webratio.com:8081/knowledgebase/article/Getting-started-with-the-Script-unit.
I think it's better to put a Query unit/component with update sql query like: "update entity set attr = attr+1 where oid = :oid" passing oid as input parameter.