Adding multiple conditional expressions with SWITCH

Return to top

2 Comments

  • Stacy Win

    Does anyone know if the switch expression supports wildcards?

    Use Case: Have various organizations that need to be grouped together

    • ncxyz = North Carolina
    • ncabc = North Carolina
    • flabc = Florida
    • fldef = Florida

    Would like to know if either of these options would work?

    Option 1: SWITCH ([Organization]) {

                                 Case "nc":North Carolina

                                 Case "fl":Florida

                                 Default:TBD }

    Option 2: SWITCH ([Organization]) {

                               Case "nc*":North Carolina

                               Case "fl*":Florida

                                Default:TBD }

    1
  • Dave Dyson
    Zendesk Community Manager
    Hi Stacy, 
     
    I think you might be better off using a nested IF/THEN statement, and using the STARTSWITH text function to check to see if the first two characters of the organization name match "nc", "fl", etc.. See Using the IF THEN ELSE function and the STARTSWITH function info here: Text functions
    -1

Please sign in to leave a comment.

Powered by Zendesk