# Multiple Choice

**URL:** <https://community.easymorph.com/t/multiple-choice/4910>\
**Category:** General Q&A\
**Created:** [October 12, 2023, 9:48am UTC](https://community.easymorph.com/t/multiple-choice/4910 "2023-10-12T09:48:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felippe.Costa](https://community.easymorph.com/letter_avatar_proxy/v4/letter/f/34f0e0/32.png) [@Felippe.Costa](https://community.easymorph.com/u/Felippe.Costa)\
**Post date:** [October 12, 2023, 9:48am UTC](https://community.easymorph.com/t/multiple-choice/4910/1 "2023-10-12T09:48:43Z")

</div>

Community, hello. I'm new around here and do apologize if this is not the correct place to post my question.

When dealing with Multiple Choice parameter, how to handle when none is selected?  
Example: consider a multiple-choice parameter named "mChoice" and the following SQL:  
SELECT  
\*  
FROM  
[bla]  
WHERE  
[id] = {keyID}  
AND [client] in ({mChoice})

when we have at least one item selected on that multiple choice parameter, it works out good;  
But when there's none item selected, I'm unable of selecting every [client] possible.

Is there a way of doing it?

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [October 12, 2023, 1:03pm UTC](https://community.easymorph.com/t/multiple-choice/4910/2 "2023-10-12T13:03:55Z")

</div>

Hello Felippe and welcome to the Community!

You can have a calculated parameter as follows:

```
{Condition} = IF not isempty({mChoice}) THEN "[client] in (" & {mChoice} & ")" ELSE "1=1"

```

And then use it in the query as below:

SELECT  
\*  
FROM  
[bla]  
WHERE  
[id] = {keyID}  
AND {Condition}

---

<div class="post-metadata">

**Author:** ![Felippe.Costa](https://community.easymorph.com/letter_avatar_proxy/v4/letter/f/34f0e0/32.png) [@Felippe.Costa](https://community.easymorph.com/u/Felippe.Costa)\
**Post date:** [October 12, 2023, 4:53pm UTC](https://community.easymorph.com/t/multiple-choice/4910/3 "2023-10-12T16:53:36Z")

</div>

you angel! it worked \<3  
thank you very much @dgudkov

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [October 12, 2023, 4:59pm UTC](https://community.easymorph.com/t/multiple-choice/4910/4 "2023-10-12T16:59:47Z")

</div>

You're welcome 🙂
