[Stackoverflow] [Progress OpenEdge ABL] Can I use OR in a CASE statement?

Status
Not open for further replies.
F

Felice

Guest
Is there a way to use OR in a Case statement? In this example, if phoneType is one of several values, I want to call a function. Do I need to list every possible value with a separate WHEN statement?

Code:
    ```CASE ttPhoneData.phoneDescription:
            WHEN "Cell" OR "PASTORS PHONE" OR "Alternative" THEN
                RUN CreatePhone("Mobile", TRUE, ttPhoneData.phone).
            WHEN "Business" OR "ChurchPhone" OR "ChurchPhone2" THEN
                RUN CreatePhone("Work",TRUE,ttPhoneData.phone).
            WHEN "Home" THEN 
                RUN CreatePhone("Home",TRUE,ttPhoneData,phome).
        END CASE.```

Continue reading...
 
Status
Not open for further replies.
Top