# switch

switch() function is the Standard function available in 200OK.

**Description** : The switch function evaluates an expression against a list of values and their corresponding results.

**Syntax** : fx\_switch()

**Example** : fx\_switch(Binod;Mohan;BLR;Binod;VKP;Mukesh;BAM) would return "VKP" as the response.

Here we go with simple scenario using the above function.

**Scenario**  :  In a shipping application, a logistics coordinator is determining the destination code for a package based on the recipient's name. They utilize the fx\_switch function to evaluate the recipient's name against a list and assign the corresponding destination code, streamlining the shipping process.

<br>

**Request Side** :&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/VHYibwVnNQGhkv_Y5JgmgiZCY3X1YO2gMhc-XRns5iO9Eba9odVdDvl3Nnjj8DvbmoOH01k1tgiCvw4bkZO1Gz_BXoYii_fSxJc5cne89X4auPlMN79dQuRGzhmzTgMebRuV8X7txPdsr6XFIPTxZ40" alt=""><figcaption></figcaption></figure>

**Response Side** :&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/l_LwDQOrS2yw2ABSyFhmUf0wQoXEK07oqXIsy6xFT3VCzthP7Cu0CWlZ4QATvaQqWtaTjCOMug2SqtqF5z8bnaGIbPbFJlyUDt78OMPICUEz7RRJ1fCYemZzrwAC4crF9RsLCbwHKToVVyA9YEkTjg8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/3_l0JqR8RM4uH01L0JmYb5cdkrd_kc55Z_xgOI2X-vRk0TqtYRUxuUekiGympaOsmXniZhgTyMYm02YmUPI59wbHpzhQunZXS-tb_qdnklpiO8DWYC7A4NI51-raTuirX0tX-3G5_k_SXPZcLHmkKgU" alt=""><figcaption></figcaption></figure>
