Legacy Dev Forum Posts

 View Only

Sign Up

Converting a String variable into an INT variable in a script Data action

  • 1.  Converting a String variable into an INT variable in a script Data action

    Posted 06-05-2025 19:14

    KG1980 | 2023-03-06 04:28:04 UTC | #1

    ``` Hey Team - How do we convert a String Variable into a Number when assigning to dynamic variable?

    This doesn't work

    ZipCode is String and intZip is a dynamic number


    Ebenezer_Osei | 2023-03-06 19:27:56 UTC | #2

    Hello,

    MathJS has a math.number function that might work for you. Here is a page to reference: https://mathjs.org/docs/reference/functions/number.html. Though, when we use MathJS inside scripter, we drop the "math" part, so it would look something like: number("90210") . This would convert the string into a number format. Hope this helps answer your question.

    Best


    system | 2023-04-06 19:28:35 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 18728