Home > Forum > General > [solved] "Change value of single field" acttion - error - remember Constants are "text"

[solved] "Change value of single field" acttion - error - remember Constants are "text"
0

Error:
[Quote]
Error occured during business rule evaluation.

String values cannot be multiplied
at: Evaluation requested
at: Evaluation node: Operator (+)
at: Evaluation node: Operator (*)
at: Evaluation node: Operator (*)
[/Quote]

What I have :
-process static A
-process static B
-process static C
-process static D

attribte a,b,c
attribute a,b,c is changing dynamically vs Item List

attribte d

I try to change Value of Attribute D on path .. = error OK, then is not saved data so I move step forward .. but again error ...

so .. how to calculate:
D = (A*B)*a + (A*B)*b+(A*C)*c ?

why I don't have rulle in a,b,c to "fix" D" ? .. I did not JS and ten I had error multiple time run rule ... so next idea was change in transaction on path

In reply to: Jacek Wojnar

Hi,
it looks like the fields "_suma xxx " are text fields. If so (and it has to be) you need to convert them to a number (screen)
But it would be better to make these fields as numeric ;)

Thank you.
I have been struggling not with static types because, in WebCon (2022), you cannot set the type of a static variable.
I mistakenly thought that WebCon would automatically convert static variables to the appropriate types,
similar to some programming languages: if you use it as text, it would be treated as text;
if you use it as an integer, it would be treated as an integer.

Finally it works on first path ....