Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Convert string to integer

    Posted 09-26-2024 11:52
    No replies, thread closed.

    Hi all, 

    I need to convert full string value to integer and here is what I noticed:

    if string begins with alphabet char - conversion fails right away, but if there is at least one number symbol it converts it and ignore remaining part of string. 

    Task.testString = a123

    Task.resultString = ToInt(Task.testString, -1) \\ we'll get -1 in this case

    ===============

    Task.testString = 123a1245ab

    Task.resultString = ToInt(Task.testString, -1) \\ we'll get 123 here

    IF it is designed like that - could Expression help be more specific about cases like that? Or maybe it is simply a bug???

    Thanks


    #ArchitectureandDesign

    ------------------------------
    Vitalii Hetman
    Miratech, Inc
    ------------------------------


  • 2.  RE: Convert string to integer

    Posted 09-26-2024 12:04
    No replies, thread closed.

    Which flow type are you using?



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Convert string to integer

    Posted 09-26-2024 12:41
    No replies, thread closed.

    That's in inbound call flow



    ------------------------------
    Vitalii Hetman
    Miratech, Inc
    ------------------------------