Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Visibility formatting

    Posted 2 days ago

    If I want my variable to be visible when it equals order or missing-info, what should the formatting look like? I put it this way, but it was not visible when I did a test.

    Thanks in advance.


    #Scripts

    ------------------------------
    Corey Lanier
    Shaw Industries Group, Inc.
    ------------------------------


  • 2.  RE: Visibility formatting

    Posted 2 days ago

    Hi,

    Try

    Variable == "Value1" OR Variable == "Value2"



    ------------------------------
    Cheers
    Zubair
    ------------------------------



  • 3.  RE: Visibility formatting

    Posted 2 days ago

    Hi Corey,

    It looks like you need to compare the variable against both values. Try:

    {{UnifyOrderStatus}} == "order" OR {{UnifyOrderStatus}} == "missing-info"

    In your current expression, "missing-info" isn't being compared to {{UnifyOrderStatus}}, so the condition won't evaluate as expected. If it still doesn't work, I'd also verify the exact value stored in UnifyOrderStatus (including case and any spaces).



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 4.  RE: Visibility formatting

    Posted 10 hours ago

    The correct formatting for the Visible property expression should use the logical OR operator to check multiple values, like this:

    Variable == "order" OR Variable == "missing-info"

    If you wrote the expression exactly as described, and the component still isn't visible during testing, it's highly likely that the value stored in the variable doesn't match the string "order" or "missing-info" in terms of case, spelling, or extra whitespace.

    For a visibility expression to work, the evaluation must return a Boolean True for the component to appear. Therefore, ensure your variable's actual content exactly equals one of those values. I recommend adding a temporary step before your visibility condition to log the variable's value or pass it to an agent, so you can confirm the precise string you're comparing against, and also double-check that your expression correctly refers to the variable you're testing.



    ------------------------------
    Camila Meneghini
    ------------------------------