How to query on a Multi-Select Picklist?

With the Oracle Web Service, I'm having trouble trying to figure out why I am unable to query for a Lead using only a Custom MultiSelect Picklist that I have.
The Multi-Select Picklist has 3 values:
- Picklist 1 (ID: <No Values>)
- Picklist 2 (ID: Picklist 2)
- Picklist 3 (ID: Picklist 3)
I have leads with selected values
- Picklist 3
- Picklist 2 and Picklist 3
Whether I query for any leads with a single value or multiple values, I'm getting nothing in return.
~= 'Picklist 3' (Returned Nothing but results do exist in the CRM UI)
~= 'Picklist 2;Picklist 3' (Returned Nothing but results do exist in the CRM UI)
~= 'Picklist 2,Picklist 3' (Returned Nothing but results do exist in the CRM UI)
When I query using LIKE though, I get results....one of the results being a lead with just "Picklist 3" as the value for the Multi Select Picklist
~LIKE '*Picklist 3*' (25 Leads are returned with values of both Picklist 3 and Picklist 2, Picklist 3)
And as a side note, I'm able to successfully insert/update values into this Multi select picklist as
Picklist 2;Picklist 3
Any help would be greatly appreciated!

Kishore
Thank you for the reply. Unfortunately, I have already specified the fields I do want returned...I just didn't post them as they are irrelevant to my question. What my question is attempting to say is that if I were to run my actual query on a database the query would look like this:
select LeadEmail from Lead where CustomMultiPicklist1 = 'Picklist 3' (Using the API: ~= 'Picklist 3')
This returns 0 results even though I have a Lead with CustomMultiPicklist1 = 'Picklist 3'
On the other hand if I were to do the following query....results are returned.
select LeadEmail from Lead where CustomMultiPicklist1 like '%Picklist 3%' (Using the API: ~LIKE '*Picklist 3*')
So pretty much I'm trying to figure out what the correct syntax is for querying CustomMultiSelectPicklists only.
Thanks
Edited by: tyler m on May 5, 2010 7:17 AM

Similar Messages

  • How to convert a optionset into multi selection picklist in crm 2011 using javasacript??

    hi,
    where user want to select not only one but multiple value
    from a pick list. I tried  examples but it shows some errors.
    How  to do it??

    Hey I meet a problème on my development see my result :
    link : https://social.microsoft.com/Forums/getfile/652331
    a multiple select list on my crm 2013 I do this process on this forum :
    link : https://social.microsoft.com/Forums/en-US/2db47a59-165d-40c9-b995-6b3262b949eb/how-to-convert-a-optionset-into-multi-selection-picklist-in-crm-2011-using-javasacript?forum=crmdevelopment
    my development :
    // var_sc_optionset >> Provide schema-name for Option Set field
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // OSV >> Provide text field object which will store the multi selected values for Option Set
    //Method to convert an optionset to multi select Option Set
    function ConvertToMultiSelect(var_sc_optionset, var_sc_optionsetvalue, OS, OSV)
    if( OS != null && OSV != null )
    OS.style.display = "none";
    Xrm.Page.getControl(var_sc_optionsetvalue).setVisible(false);
    // Create a DIV container
    // var addDiv = document.createElement("<div style='overflow-y:auto; color:#000000; height:160px; border:1px #6699cc solid; background-color:#ffffff;' />");
    var addDiv = document.createElement("div");
    addDiv.style.overflowY = "auto";
    addDiv.style.height = "160px";
    addDiv.style.border = "1px #6699cc solid";
    addDiv.style.background = "#ffffff";
    addDiv.style.color = "#000000";
    OS.parentNode.appendChild(addDiv);
    // Initialise checkbox controls
    for( var i = 1; i < OS.options.length; i++ )
    var pOption = OS.options[i];
    if( !IsChecked( pOption.text , OS, OSV) ){
    // var addInput = document.createElement("<input type='checkbox' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    else {
    // var addInput = document.createElement("<input type='checkbox' checked='checked' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("checked","checked");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    // var addLabel = document.createElement( "<label />");
    var addLabel = document.createElement( "label");
    addLabel.innerText = pOption.text;
    // var addBr = document.createElement( "<br />"); //it's a 'br' flag
    var addBr = document.createElement( "br"); //it's a 'br' flag
    OS.nextSibling.appendChild(addInput);
    OS.nextSibling.appendChild(addLabel);
    OS.nextSibling.appendChild(addBr);
    ///////Supported functions
    // Check if it is selected
    function IsChecked( pText , OS, OSV)
    if(OSV.value != "")
    var OSVT = OSV.value.split(";");
    for( var i = 0; i < OSVT.length; i++ )
    if( OSVT[i] == pText )
    return true;
    return false;
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // Save the selected text, this field can also be used in Advanced Find
    function OnSave(OS, var_sc_optionsetvalue)
    var getInput = OS.nextSibling.getElementsByTagName("input");
    var result = '';
    for( var i = 0; i < getInput.length; i++ )
    if( getInput[i].checked)
    result += getInput[i].nextSibling.innerText + ";";
    //save value
    control = Xrm.Page.getControl(var_sc_optionsetvalue);
    attribute = control.getAttribute();
    attribute.setValue(result);
    I have to do 2 field one is option list field and the second is textfield, 
    option list field : new_books
    textfiled          : new_picklistvalue
    my js is on onload event see : 
    link : https://social.microsoft.com/Forums/getfile/652333
    thanks you for you'r help 

  • How to make Multi Select Picklist Field Required Based on another field

    Hi,
    I want to make one filed which is Multi select Required(mandatory) based on certain value in another filed.
    I tried putting IIf([<FieldNAme>]> 1000 AND [<FiledNAme1>] IS NULL,"Invalid",[<FieldNAme>]) in the Field validatation as but it is not working.
    Please suggest any workaround available.
    Warm Regards
    Pramod
    Edited by: user11361975 on Jun 3, 2011 5:03 AM

    I guess FieldName1 is the multiselect picklist you are referring to?
    Where did you get the ITAG from? I don't see any multiselect picklists available in Expression Builder. I doubt whether you can set validations on multi select picklists at all.
    If anyone has achieved this please let me know as well.
    Regards,
    Udaya

  • Prompts and Multi-Select Picklists

    Hi all,
    I'm trying to find a neat way of prompting and doing a "contains any" filter a report i have on a multi select picklist within accounts.
    e.g. Field can have values A, B, C
    Account 1: A
    Account 2: A, B
    Account 3: B, C
    Account 4: A, C
    Account 5: A, B
    I wanted a report to give me anything with A or C in it... should bring back 1,3,4,5
    I used a dashboard prompt as i like the look of the Multi-Select box used. The problem used was that when i first ran it the options I was given were:
    A
    A,B
    B,C
    A,C
    Basically listing the different combinations possible... but i just want the list to say A, B,C. So i tried to put this SQL query on the values:
    +'SELECT "- Custom MSP_1 (Account)".MSPICK_01 FROM "Account Analysis" WHERE "- Custom MSP_1 (Account)".MSPICK_01 NOT LIKE '%,%' '+
    The problem is that it (correctly) only bring back the values that occur on their own... so only "A"!
    Any way for me have it pull back just the values defined in the picklist under app customisation?
    Feel like i rambled on but hopefully it makes sense!
    Thanks,
    Alex

    I can see what you are trying to get at, but I wonder if it will work.
    Even if you somehow get A,B,C as individual values in the prompt then how is it going to filter the report.
    Lets say on the dashboard prompt you select B then as per your example your report should show Account 2,3,5.
    But it wont because the field that you have used in your report doesn't contain B as a standalone. The values that it contain say A,B or B,C is one string or one entity.
    So the multi-select prompt based on that field is going to show the values contained in that field which is what you are initially getting.
    You will have to do something in the report itself to break it down so that you get A,B,C as single entity.
    I have a vague idea but I wonder if it works. You can still try though :)
    Assuming your report is a single criteria report, pull any field and edit its Fx as follows:
    CASE WHEN - Custom MSP_1 (Account)".MSPICK_01 LIKE '%A%' THEN 'A' WHEN - Custom MSP_1 (Account)".MSPICK_01 LIKE '%B%' THEN 'B' WHEN ... ELSE NULL END
    Assuming here that you only have values like A,B,C.
    So what I am hoping is that the custom field that we created will have values like A,B,C as separate entities and in the table view for your example we will have 9 rows.
    Account MSPICK Custom Field
    Acc 1 A A
    Acc 2 A,B A
    Acc 2 A,B B
    Acc 3 B,C B
    Acc 3 B,C C
    and so on
    Finally in your prompt design, take any field and modify its Fx like the CASE WHEN condition described above and that should give you A,B,C as you want it.
    Also you may hide the custom field in your final report.

  • Problem to convert a optionset into multi selection picklist on crm 2013

    Hey I meet a problème on my development see my result :
    link : https://social.microsoft.com/Forums/getfile/652331
    a multiple select list on my crm 2013 I do this process on this forum :
    link : https://social.microsoft.com/Forums/en-US/2db47a59-165d-40c9-b995-6b3262b949eb/how-to-convert-a-optionset-into-multi-selection-picklist-in-crm-2011-using-javasacript?forum=crmdevelopment
    my development :
    // var_sc_optionset >> Provide schema-name for Option Set field
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // OSV >> Provide text field object which will store the multi selected values for Option Set
    //Method to convert an optionset to multi select Option Set
    function ConvertToMultiSelect(var_sc_optionset, var_sc_optionsetvalue, OS, OSV)
    if( OS != null && OSV != null )
    OS.style.display = "none";
    Xrm.Page.getControl(var_sc_optionsetvalue).setVisible(false);
    // Create a DIV container
    // var addDiv = document.createElement("<div style='overflow-y:auto; color:#000000; height:160px; border:1px #6699cc solid; background-color:#ffffff;' />");
    var addDiv = document.createElement("div");
    addDiv.style.overflowY = "auto";
    addDiv.style.height = "160px";
    addDiv.style.border = "1px #6699cc solid";
    addDiv.style.background = "#ffffff";
    addDiv.style.color = "#000000";
    OS.parentNode.appendChild(addDiv);
    // Initialise checkbox controls
    for( var i = 1; i < OS.options.length; i++ )
    var pOption = OS.options[i];
    if( !IsChecked( pOption.text , OS, OSV) ){
    // var addInput = document.createElement("<input type='checkbox' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    else {
    // var addInput = document.createElement("<input type='checkbox' checked='checked' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("checked","checked");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    // var addLabel = document.createElement( "<label />");
    var addLabel = document.createElement( "label");
    addLabel.innerText = pOption.text;
    // var addBr = document.createElement( "<br />"); //it's a 'br' flag
    var addBr = document.createElement( "br"); //it's a 'br' flag
    OS.nextSibling.appendChild(addInput);
    OS.nextSibling.appendChild(addLabel);
    OS.nextSibling.appendChild(addBr);
    ///////Supported functions
    // Check if it is selected
    function IsChecked( pText , OS, OSV)
    if(OSV.value != "")
    var OSVT = OSV.value.split(";");
    for( var i = 0; i < OSVT.length; i++ )
    if( OSVT[i] == pText )
    return true;
    return false;
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // Save the selected text, this field can also be used in Advanced Find
    function OnSave(OS, var_sc_optionsetvalue)
    var getInput = OS.nextSibling.getElementsByTagName("input");
    var result = '';
    for( var i = 0; i < getInput.length; i++ )
    if( getInput[i].checked)
    result += getInput[i].nextSibling.innerText + ";";
    //save value
    control = Xrm.Page.getControl(var_sc_optionsetvalue);
    attribute = control.getAttribute();
    attribute.setValue(result);
    I have to do 2 field one is option list field and the second is textfield, 
    option list field : new_books
    textfiled          : new_picklistvalue
    my js is on onload event see : 
    link : https://social.microsoft.com/Forums/getfile/652333
    thanks you for you'r help 

    Hey I meet a problème on my development see my result :
    link : https://social.microsoft.com/Forums/getfile/652331
    a multiple select list on my crm 2013 I do this process on this forum :
    link : https://social.microsoft.com/Forums/en-US/2db47a59-165d-40c9-b995-6b3262b949eb/how-to-convert-a-optionset-into-multi-selection-picklist-in-crm-2011-using-javasacript?forum=crmdevelopment
    my development :
    // var_sc_optionset >> Provide schema-name for Option Set field
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // OSV >> Provide text field object which will store the multi selected values for Option Set
    //Method to convert an optionset to multi select Option Set
    function ConvertToMultiSelect(var_sc_optionset, var_sc_optionsetvalue, OS, OSV)
    if( OS != null && OSV != null )
    OS.style.display = "none";
    Xrm.Page.getControl(var_sc_optionsetvalue).setVisible(false);
    // Create a DIV container
    // var addDiv = document.createElement("<div style='overflow-y:auto; color:#000000; height:160px; border:1px #6699cc solid; background-color:#ffffff;' />");
    var addDiv = document.createElement("div");
    addDiv.style.overflowY = "auto";
    addDiv.style.height = "160px";
    addDiv.style.border = "1px #6699cc solid";
    addDiv.style.background = "#ffffff";
    addDiv.style.color = "#000000";
    OS.parentNode.appendChild(addDiv);
    // Initialise checkbox controls
    for( var i = 1; i < OS.options.length; i++ )
    var pOption = OS.options[i];
    if( !IsChecked( pOption.text , OS, OSV) ){
    // var addInput = document.createElement("<input type='checkbox' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    else {
    // var addInput = document.createElement("<input type='checkbox' checked='checked' style='border:none; width:25px; align:left;' />" );
    var addInput = document.createElement("input" );
    addInput.setAttribute("type","checkbox");
    addInput.setAttribute("checked","checked");
    addInput.setAttribute("style","border:none; width:25px; align:left;");
    // var addLabel = document.createElement( "<label />");
    var addLabel = document.createElement( "label");
    addLabel.innerText = pOption.text;
    // var addBr = document.createElement( "<br />"); //it's a 'br' flag
    var addBr = document.createElement( "br"); //it's a 'br' flag
    OS.nextSibling.appendChild(addInput);
    OS.nextSibling.appendChild(addLabel);
    OS.nextSibling.appendChild(addBr);
    ///////Supported functions
    // Check if it is selected
    function IsChecked( pText , OS, OSV)
    if(OSV.value != "")
    var OSVT = OSV.value.split(";");
    for( var i = 0; i < OSVT.length; i++ )
    if( OSVT[i] == pText )
    return true;
    return false;
    // var_sc_optionsetvalue >> Provide schema-name for field which will store the multi selected values for Option Set
    // OS >> Provide Option Set field object
    // Save the selected text, this field can also be used in Advanced Find
    function OnSave(OS, var_sc_optionsetvalue)
    var getInput = OS.nextSibling.getElementsByTagName("input");
    var result = '';
    for( var i = 0; i < getInput.length; i++ )
    if( getInput[i].checked)
    result += getInput[i].nextSibling.innerText + ";";
    //save value
    control = Xrm.Page.getControl(var_sc_optionsetvalue);
    attribute = control.getAttribute();
    attribute.setValue(result);
    I have to do 2 field one is option list field and the second is textfield, 
    option list field : new_books
    textfiled          : new_picklistvalue
    my js is on onload event see : 
    link : https://social.microsoft.com/Forums/getfile/652333
    thanks you for you'r help 

  • Workflow on Multi-Select Picklist

    Afternoon,
    I am trying to create and display values on a Multi-Select Picklist through workflow on an email notification upon a SR being created and saved.
    Basically i am trying to create an email notification to be generated when a service request is created and saved that will display what values were selected in a multi-select picklist.
    I was wondering if anyone else has had this issue or know how this can be resolved. Of course this was a newly created field and i left it over the weekend to create and allow for reporting.
    Any assistance would be greatly appreciated.

    Mani, that is correct. Workflow currently does not support multi-select picklist fields.

  • Can multi-select picklist be used in Expression Builder?

    Does CRMOD allow the use of multi-slect picklist in Expression Builder within workflow?

    Thanks Suddu your process worked. This can be done it is just a little more manual than being able to select the field from the drop down list.
    To do this go to Admin, Application Customization, choose your record type, then Field Setup. Click on Rename Fields, then Advanced and copy the multi-select picklist field. Paste it into expression builder and at the end of the name add _ITAG. You will also need to add the brackets as well. Doing this will allow you to use a mspl in expression builder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Pros and Cons of Multi-Select Picklists

    Hi All,
    I'm considering implementing some multi-select picklists (MSPL) but am concerned about the possible limitations in reports. I'd like to hear about your opinions and experiences on the pros, cons and other limitations of MSPL's.
    Thanks,
    Cameron

    Hi,
    From a report perspective you can use these, keep the number of values in your picklist below 20 though or you lose the ability to report on each picklist value individually. You can also report on the whole contents of the field, it appears as a comma delimited list:
    Company A, Company B, Company C....
    Hope this is of use
    Innoveer

  • Assessment Scripts and Multi Select Picklists

    Hi
    Is it possible for a question within an assessment script to have more than one answer and therefore update a Multi-Select picklist?
    We have a script that would be ideal for an assessment script but there are a number of questions within the script that would require multiple answers - any help or suggestions appreciated
    Cheers

    The assessment functionality only allows one answer per question to be stored in the Lead, Contact, Opportunity or Service Request object.

  • How can I validate a multi-select box to have at least 1 option

    How can I validate a multi-select box to have at least 1 option
    selected in struts?

    thanks i will try that other then that if I want to create single drop down list and pass multiple values associated to that drop list value how would i do that....

  • How do I default a multi-select to have all values selected

    Hi all,
    I have a report (standard, not interactive - for various reasons) and I have a number of 'search' fields that the use can use to fulter the results shown. One of these fields is a multi-select list which allows the users to select multiple values at the same time. This is working fine.
    My problem is in setting the default for the multi-select list to have all values selected (either when the page is first opened or when the user clicks a 'reset' button).
    The multi-select query is:
    select
         lv1.description d, lv1.lookup_code r
    from
         tpa_adm_lookup_types lt1,
         tpa_adm_lookup_values lv1
    where
         lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and     lv1.delete_flag = 'N'
    order by 1
    how do I get it to default to everything selected?
    Many thanks,
    Martin

    Hi Andy,
    Yes it is a dynamic list so a fixed default is no good.
    I have built the field with a source (when session state is null) of:
    with data as (
    select lookup_code, row_number() over(order by lv1.description) rn,count(*) over () cnt
    from tpa_adm_lookup_values lv1,
         tpa_adm_lookup_types lt1
    where lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and lv1.delete_flag = 'N'  )
    select ltrim(sys_connect_by_path(lookup_code,':'),':') catvalues
    from data
       where rn = cnt
       start with rn = 1
       connect by prior rn = rn-1;which works but I was hoping ApEx had a cleaner solution.
    Regards,
    Martin

  • How to dipsplay value of multi select prompt in Answers

    I have a request in Answers that has a multi select column prompt. I can display the value selected in the prompt in the Narative view as long as only one value is selected. When more than one value is selected, how can I display the multiple values selected in the Narative view?
    Thanks in advance.
    Sandeep

    Multi select can not be assigned to Presentation variable (It is greyed out), so you can not get the respective values.

  • How to make list item multi select

    Hi all,
    I'm suing Oracle 10g and I want to make a TList multi-selectable and then how I can return the selected records
    Thanks in advance :)

    This is where you should go
    ttp://www.oracle.com/technology/sample_code/products/forms/index.html
    in add , with it is not possible with a default TLIST, LOV ...., so you'll need to create your own:
    for example, I use a normal block with a checkbox on each row for the user to select records

  • Query values in Multi Select form field

    I have a table and one of the fields is a multiple select box. It is currently working fine
    What I now need to do is create a report based on the individual elements in that field: (This report will really just do a count of the events for ownership purposes)
    Example:
    Table simplified:
    Name     | Teams Involved
    One     | TeamA:TeamB:TeamC:TeamD
    Two | TeamC
    Three | TeamB:TeamD
    Four | TeamA:TeamD
    Five | TeamD
    Six | TeamA
    Seven | TeamA
    Eight | TeamB
    The Teams Involved are populated from a Multiple Select LOV so the Data will always remain constant in spelling etc...
    TeamA
    TeamB
    TeamC
    TeamD
    I am trying to create a report that will show me the number of times a team is selected in the Teams Involved column and the results would look like:
    TeamA 4
    TeamB 3
    TeamC 2
    TeamD 4
    I am not very good with PL/SQL but assuming I might need to do a foreach loop type using the values in the LOV and the LIKE %LOVVALUE% but just not really sure
    any assistance would be appreciated.
    Thanks in advance
    wfsteadman

    As Prabodh pointed out, I'm placing a colon at the beginning and end of the value list before doing the LIKE, so every value in the list is guaranteed to have a colon before and after it.
    Of course, this could be a performance issue if your dataset becomes large--you're not going to be able to use an index on this column--in which case you'll want to go to a more normalized solution (a table for your teams, a table for your projects [or whatever], and a reference table in the middle), but then you'll need to worry about parsing your multi-select values via a view with an instead of insert trigger. I do this on my blog for assigning tags to posts; it's not difficult, but APEX--for whatever reason--doesn't expose triggers on views as easily as on tables.
    -David

  • Reporting on Multi Select Picklists

    According to Doc ID 553362.1 Multi Value Picklists are available for Custom Reports. However, it does not appear in the list of fields in my Custom Object #2 reporting and/or analytics area. Can someone confirm they are available for reporting. Thanks

    MSP is only available in Analytics subject areas and CO's are only available in Reporting Subject Areas. Contact Customer Care and create an enhancement request.

Maybe you are looking for

  • Lost ability to view the status of PDF conversion

    Greetings, I've been using CS5 for about a week after upgrading from CS4 on Windows 7. Everything was running fine until yesterday afternoon, when I suddenly lost the ability to view the status of the conversion of InDesign files to PDFs. Normally, w

  • BEx Variable defined in BI 7.0 Query Designer and using in BW 3.5 Analyzer

    Hi,   I have defined a variable in BI 7.0 Query designer for a characteristic which is present in characteristic restrictions area to restrict it . Ideally when that query is executed a pop up box should be opened to enter a value of the variable. Bu

  • HT6378 What happened to my photo stream photos?

    Only my photos from the camera roll saved to 'all photos.' I lost over 700 photos that were in my photo stream. What happened to them?

  • Afterpform - not returning all info

    I am 'printing/displaying' the parameter form on the last page of the report via the trailer section. I have sucessfully added some of the parameters to the last page display the title and &parameter such as Store: &store However I have a parameter t

  • IMac crashing/freezing

    Yesterday I decided to hop on my iMac and browse the internet and I went on to Youtube and when I went to load a website my iMac started beachballing. I let it sit for a few minutes but when I tried to force quit the icon looked like I had clicked on