The Percentile rank is something like 0.023, which I can format easily enough as 2%. However, I want to present text likie-
“You scored in the 2nd percentile”.
or “You scored in the 13th percentile.”
or “You scored in the 98th percentile…”
I see there is this topic here,
which is close but not really helping me out.
There is this post on stackOverflow for how to write javascript to convert numbers to the ordinal format
Is it possible to use the Toolbox plugin to run custom javascript that will format the specific numbers I want to format?
I think there is a Bubble way to do this but I honestly find the forums difficult to track down information and I am feeling too lazy to look for it. To answer your question re the Toolbox plugin, yes it can easily be done.
You could use the run javascript but if you using it for display only I would use the “Expression” element from the Toolbox plugin. Posting the code below and then you use Expression A's value
Use this as the expression (I conformed it works as expected):
function nth(n){return["st","nd","rd"][((n+90)%100-10)%10-1]||"th"}
nth(10);