Hinzufügen mehrerer konditionaler Ausdrücke mit der Funktion SWITCH



image avatar

Rob Stack

Zendesk Documentation Team

Bearbeitet 05. März 2025


6

0

4 Kommentare

      it's hard to find here how to write case "null" or case 0...

      1


      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

      0


      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


      Olá, seria possível utilizar esta função para campos de data, utilizando condições como "<=" ou >?

      0


      Anmelden, um einen Kommentar zu hinterlassen.

      Kontodetails

      Melden Sie sich an, um weitere Details zu sehen

      Melden Sie sich an, um Ihre Kontodaten auf einen Blick zu sehen

      Anmelden