Summary

This article covers the add command.


Description

This command returns the sum of all numbers provided as parameters. Note that any questions that are not answered will be treated as zero.

Attributes

  • operator – “+” or “-”

Parameters

  • two or more number commands

Example

<script scriptId="tcv">
    <body>
        <s:assign>
            <s:question path=".contractValueTotal"/>
            <s:round decimals="2">
            
                <s:add>
                    <s:numberPath path=".contractValue:value"/>
                    <s:numberPath path=".corValue1:value"/>
                    <s:numberPath path=".corValue2:value"/>
                    <s:numberPath path=".corValue3:value"/>
                    <s:numberPath path=".corValue4:value"/>
                    <s:numberPath path=".corValue5:value"/>
                </s:add>
                
            </s:round>
        </s:assign>
    </body>
    <target typeId="contractValue" when="preprocess" shouldReconcile='true'/>
    <target typeId="corValue1" when="preprocess" shouldReconcile='true'/>
    <target typeId="corValue2" when="preprocess" shouldReconcile='true'/>
    <target typeId="corValue3" when="preprocess" shouldReconcile='true'/>
    <target typeId="corValue4" when="preprocess" shouldReconcile='true'/>
    <target typeId="corValue5" when="preprocess" shouldReconcile='true'/>
</script>

Need more help?

Please visit the Fountayn Contact Information page.