Update Process Data
I have a number box, called Number, that I want to increment by 1 in the Update Process Data activity. Something similar to Number=Number+1. Is this possible to do? Or is there another activity that will allow me to do this. Seems like it should be a very simple operation, but I cannot seem to figure it out. I do not want to do this on a form, I would prefer it to be an activity the the process model if at all possible.
I can make the expression be 1+1 and it will add to 2. But if I throw a variable + 1 it fails.
Does anyone know how can I achieve my desired results?
-
Hi,
The update process data shape is actually just generating a C# code snippet, so you can put C# code into the expression box. The fields have type "object". You can just convert them to an integer for example to do arithmetic operations.
F.e.:
- Convert.ToInt32(${/pd:AP/pd:formFields/pd:NumberBox1})+1
or
- int.Parse(${/pd:AP/pd:formFields/pd:NumberBox1}.ToString())+1
An alternative shape would be the inline functions with expression: @Sum(${/pd:AP/pd:formFields/pd:NumberBox1},1)
regards,
Mario
- Convert.ToInt32(${/pd:AP/pd:formFields/pd:NumberBox1})+1
Please sign in to leave a comment.
Comments
1 comment