MySQL | Find if particular value is selected in multi pick list

|
| By Webner

In simple pick list we can select only one value but in multi pick list we can select one or more values.

Scenario: We had to multi pick list data type field

Fields that we wanted to select :

1. Field_1
2. Field_2
3. Field_3
4. Field_4

Case 1 : Check if user has selected Field_1

Select id, name From S_object where Fields includes (‘Field_1’);

Case 2 : Check if user has selected Field_1 and Field_2 values

Select id, name From S_object where Fields  includes (‘Field_1;Field_2’);

Case 3 : Check if user has selected

* Field_1 and Field_2

*Field_3

Select id, name From S_object where Fields  includes (‘Field_1;Field_2’,’Field_3’);

In this case user has selected (Field_1 and Field_2) or Field_3 values as record type are shown as result.

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Web development or any other software development assistance please contact us at webdevelopment@webners.com

Leave a Reply

Your email address will not be published. Required fields are marked *