Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Scripts - Dynamic Variables - ifElse conditional statement

    Posted 08-25-2025 11:50
    I'm working on a script that receives multiple collections (lists) as input. Within the flow, a data action is triggered based on the ANI of the call. This data action returns arrays containing strings, numbers, and boolean values.
     
    However, since the scripter does not support passing decimal and boolean lists directly, I've created two additional string lists and convert the decimal and boolean arrays into string format.
    Additionally, the script includes a manual search capability that does allow assigning results directly to decimal and boolean lists.
     
    The issue arises when I attempt to assign the selected value to a dynamic variable. Here's the ifElse statement I'm currently using:
    ifElse(
      equal({{preformedSearch}}, true),
      getIndexValue({{colExtension}}, {{selectedRecordIndex}}),
      number(getIndexValue({{colExtentsionString}}, {{selectedRecordIndex}}))
    )
     
    Regardless of whether I perform a manual search or use the values passed into the script, I consistently receive a NaN for the extension.
    Can anyone spot what might be wrong with this ifElse statement or suggest a better approach for assigning the dynamic number variable?
    Thanks in advance!

    #Scripts

    ------------------------------
    Mark Mathis
    ------------------------------


  • 2.  RE: Scripts - Dynamic Variables - ifElse conditional statement

    Posted 08-25-2025 14:53

    Just to let everyone kno, I figured out my issue, blasted parenthesis got me again



    ------------------------------
    Mark Mathis
    ------------------------------