I'm having 3 different TEXT fields containing NUMBERS and i'm trying to add all those values to a new fields as numeric data.
one of those field is:
// deliveryGroups.0.deliveryGroupId : 1
the painless script i'm using is :
//doc['deliveryGroups.0.deliveryGroupId'].value+ doc['deliveryGroups.1.deliveryGroupId'].value+ doc['deliveryGroups.2.deliveryGroupId'].value+ doc['deliveryGroups.3.deliveryGroupId'].value+ doc['deliveryGroups.4.deliveryGroupId'].value
this leads to concatenation of numbers in all fields and i get a result as : 1 or 12 or 123 or 124 instead of 1 or 3 or 6 or 7.
can someone please help me out!