web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Advanced Search for Multi-Selections

(0) ShareShare
ReportReport
Posted on by 180

I have created a multi-select field.  I want to do an advanced search for a subset that includes two tags (x AND y).  In other words, if I've tagged a contact with green, and blue, I want to see the contacts who have both, not Green OR Blue.  

*This post is locked for comments

I have the same question (0)
  • Rasmus R. Aardal Profile Picture
    on at

    Hi Hutchinsjeremy,

    Within the advanced search window, you can choose to group criteria with AND or OR.

    Set up the two criteria in a Query, highlight both of them and click the "Group AND" button in the top ribbon to search for entries that have both green AND blue.

    Good luck!

    Regards,

    Rasmus

  • hutchinsjeremy Profile Picture
    180 on at

    I tried that, but got no results.  Let me re-phrase.  I have a new field called TAGS.  I have tagged some contacts GREEN, some contacts BLUE, and some contacts GREEN and BLUE.  I want to do an advanced search that only shows either GREEN AND BLUE.  So I set up the advanced search for PEOPLE, and added TAGS, with TAG equals BLUE and on the next line, I added TAG equals BLUE.  I selected both rows and did Group AND, but came up with no results.

  • Rasmus R. Aardal Profile Picture
    on at

    Hi,

    I assume you mean that you added TAG Equals GREEN on the next line? Otherwise the query would be "Find PEOPLE where TAG equals BLUE and BLUE"

    What kind of Field is TAG? Multi-select fields are not supported in Dynamics CRM 2011/2013 as far as I know. Did you set up a section on the form called TAGS with multiple checkboxes labelled GREEN, BLUE, etc?

    Is TAGS a section on the form containing several drop-down lists With the options GREEN, BLUE, etc?

    Sorry if I am failing to grasp the essence of your problem, but the type of field(s) in which you specify the TAGS are important to troubleshooting why the query does not work.

    Regards,

    Rasmus

  • hutchinsjeremy Profile Picture
    180 on at

    Thanks so much for your responses!

    Yes, I meant tag = Green.

    The tag field is a multi-select field.  You click into it, and then there's an option to "add an existing tag" in the top ribbon.  When you click on that you get a pop-up screen that lists all the tags with checkboxes.  you can select more than one.

    If this isn't supported by Dynamics, can you suggest a workaround?

  • Rasmus R. Aardal Profile Picture
    on at

    Hi,

    This sounds like a custom scripted field. I _may_ be able to aid you if you can check what function is executed on the onLoad-event of the PEOPLE form.

    To find this, go to the form and click the "Form Properties" button. Under the "Events" tab, there should be a form library listed and one or more functions listed under the onLoad event.

    If you can open the listed Library and find the specific function(s) that fire onLoad and paste them here, it could help determine how to structure the Advanced find. If the multi select field is searchable at all.

    The supported way of setting up a multi select-ish section is to add a new "Two Options"-field for each TAG you want to be able to select. These can be organized under a form component labelled "Tags"

    In other words, create a new component (or whatever the section boxes are called in English) and label it "TAGS". Then, create a new field named "GREEN", specify that it is a "Two Options"-type of field and add it to the TAGS component on the form. If you wish to make it a checkbox, double-click the field once it is placed on the form and select "Checkbox" under the Formatting tab.

    Rinse and repeat for all other tags you wish to add, and structure the checkboxes as you see fit on the form.

    In order to make the different TAG fields searchable in quick search (Not sure whether you want to do this), go to Settings -> Customizations -> Customize the System and expand the Entities row. Find and expand the PEOPLE entity, and click "Views".

    Open the quick search view for the PEOPLE entity and click "Add search columns". Add all the TAG fields to make them searchable without cluttering the search view with lots of columns.

    Finally, you can set up the Advanced Find query to search for whichever combination of tags you want. You can for instance search for PEOPLE where BLUE equals value YES and GREEN equals value YES and PURPLE equals value NO.

    This way of solving multiple select fields in a supported way may not be a great option if the multi select contains a lot of possible values, or if the multi select lookup has to contain a search field. It is best suited for small-ish picklists, but in return it is fully supported.

    Good luck with either option, I will sporadically monitor the question for your feedback.

    Regards,

    Rasmus

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi all:

    Hutchinsjeremy, maybe you are using a Many to Many (N..N) relationship to relate "contacts" ans "tags". With that kind of relationship you can't show columns from both entities (Contact and Tag) in the same view.

    If this is your situation and like and alternative of Rasmus solution, you can create a manual Many to Many relationship between the entities. If so you have to create an intersection entity, for example "Contact tags". Then create a one to many relationship from contact to "Contact Tag" and mark as business required. Then create another one to many relationship from Tag to "Contact Tag" and mark as business required. In the form or the new entity show the lookups created with the relationshipt.

    Now you can asing many tags to a contact and show colums of both entities in the same view.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans