Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Automated decimal places for numeric pipe-in

Dear all,

I've got the following problem: In my questionnaire I ask my participants how much they are willing to pay for a certain product.
In a later question, I ask them to distribute this willingness to pay across different features of the product.
Therefore, I use the answer of the previous numeric question as part of my follow-up question by using a pipe-in. (Remember that you are willing to pay XXX$ ...)

However, the answer to the previous numeric question is always displayed with about 15 decimal places, even though the respondent did not enter any decimal places at all.

(Decimals are/have to be allowed in the previous question about the overall willingness to pay. The issue only appears using the hosting-link but not when testing the survey directly.)

I would be very happy if someone can help me fix this issue!

Thank you in advance!

Kind regards, Seb
asked Aug 17, 2021 by Seb0810 (180 points)

1 Answer

0 votes
Try using the ROUND function which you can find in the SSI Script library.

Example ...

This will display the number entered at Q1 to 2 decimal places. It will round to the 2nd decimal place which is nice.

Other functions to consider are ...

FORMATNUMBER (NUMBER,"ThousandsSeparator", "DecimalSeparator", NumDecimalPlaces)

answered Aug 17, 2021 by Paul Moon Platinum (101,255 points)
Hey Paul,

this worked out well! Thank you!

Kind regards, Seb
Awesome Seb. Well done sir.