Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Convert Numeric Numbers for grand total

Avatar

Former Community Member
How do I concatenate or join 8 numeric fields into one and make number add up for the final total. For scaning purposes, each row ends with a dollar amount and is set up as a one digit numeric field; have 8 of these. For example a row with $23,234,890 where each number is a numeric field. There can be 1 to 50 rows of these numbers.



Each row of numbers must add up to get a total number for that page. How do I accomplish this!



Yes, too much my brains! Please help!
5 Replies

Avatar

Level 7
You can use the "Sum(n1 [,n2...])" FormCalc function to return the sum of the non-null values of the passed parameters. If you use the "Concat()" function you will concatenate the value strings not sum the values.



More information is contained LiveCycle Designer's "Scripting Reference" option under LiveCycle Designer's menu "Help" option.

Avatar

Former Community Member
Thanks...Sum and Concat() worked ....



So that problem is solved BUT how do I take the grand total and put it back to its individual field OR can that be done...



example..total is $23,893.14 and it need to appear like



2 | 3 | 8 | 9 | etc..in individual numeric field?



this is required for scanning purposes.

Avatar

Former Community Member
Hi,



You could try configuring the numeric field that receives the calculated total to be a Comb. That should render it the way you want.



Cheers,



Lachlan



http://www.avoka.com

Avatar

Level 7
If you can not use the comb field, use the "Substr(s1, n1, n2)" function to extract the individual digits from the grand totals formatted value or use the "Str(n1 [, n2 [, n3]])" function to convert the grand total number to a string.