Hi,
I have a code attribute with codes 1,2,...,10 in a multiple entity. When the user adds "n" entities to the form, the sum of the code values from 1 to "n" have to add up to 10.
I'd like to check the sum of these code values in a separate attribute. Since codes in code lists are strings, the values should be converted to numbers to be able to sum them. So I figured this should work:
Custom error check, expression: sum(number(parent()/stand/share)) = 10
However I get an error in the preview window: [RPC Fault faultString="Invalid argument type for 'sum': java.lang.Double"...
Is it possible to convert a set of strings to numbers? How can I do this? I would like to keep code list instead of a numeric attribute, if it's possible.
Thanks for your help!