Forum Replies Created

  • Hi Jameel,

    You can add it to the num variable like so:

    var num = effect(“Point Control”)(“Point”)[0]

    num = “$” + Comma(num);
    [num]

    function Comma(number)
    {
    number = ” + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : ”);
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ‘,’ + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

  • New response to old post, this helped me a lot with a project I am working on. However, I used point control instead of slider to overcome the arbitrary 1,000,000 limit.

    The expression was (including commas):

    var num = effect(“Point Control”)(“Point”)[0]

    num = Comma(num);
    [num]

    function Comma(number)
    {
    number = ” + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : ”);
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ‘,’ + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy