Test a calculation

1
Hello All, Our app calculates a quote based on values a user fills in on our form. We want to calculate if the displayed quote is correct. Does ATS have actions that can perform mathematics?
asked
1 answers
1

Hi Paul,

Yes it's possible to calculate within ATS. See an example below:

By using the action ‘Execute JavaScript Integer’ you can make calculations. For example: by entering the following script you can calculate using input parameters:

X = arguments[0] + arguments[1];

return X;

This will return the sum of the input parameters ‘arguments[0]’ and ‘arguments[1]’. The same works for “-“, “/” and “*”.

Hope this helps! On questions how the action works, please take a look at the online documentation: https://docs.mendix.com/ATS/refguide-ats-1/standard-actions-reference 

answered