I'm attempting to calculate, record, and display the total incentive that survey respondents will receive depending on their performance on a game embedded in the survey. The process of calculating, recording, and displaying the respondent's incentive will repeat daily over 14 days.
If a participant records a score equal to or above 100 points on the game (as recorded in the ED day1_total), they will receive a $0.10 increment to their total incentive payment. For example, see the screenshot.
When using piped text ($${e://Field/incentive_total}) to display incentive_total to participants, the piped text does not retain zeroes that are unnecessary. That is, piping in incentive_total displays $0.1 or $ instead of $0.10 or $0.00.
Using the round operator does not seem to work.
There are a few approaches that have solved this using JS, but with minimal understanding of JS, I cannot seem to extrapolate the solutions from others' problems to my own.
Any help would be appreciated!
Best answer by ahmedA
View original