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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Ability to filter contacts in CRM based on City

(0) ShareShare
ReportReport
Posted on by 185

Hi Everyone,

I'm working on a requirement where the user should be able to filter contact based on the country and then city. For Example: If the user selects USA it should show all the states available in it and then on selecting any state for instance Jersey he should be able to see all the contacts with that city.  As of now I'm able to filter either with State or Country but not both. 

Cheers in Advance. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ThomasN Profile Picture
    3,190 on at

    Hi Ravibachanagiri,

    Thanks for reaching out. I would recommend using a chart. This is the best way to filter. The drilldown works like having multiple filter selections. You will however, not be able to predetermined what options available as the chart only shows what options the data contain. So instead of a list all 50 states you get only the states that exist within the data. Which is better in my opinion.

    Create a chart called Contacts Location or something like that. First part SUM Country > then adjust the SUM to exclude empty results. That way only contacts with the country field populated will return. On second part of chart select Country there as well, and that will group the contacts by country.

    Save and publish. The users can now select any view "active contacts" etc., and then on the chart Click on the section of the chart that represents their country and drilldown by choosing "State" field. Now they have a list of contacts in that Country selected and can select any State to filter the view on the left with that state.

    The result is a list of contacts filtered by Country THEN State. I hope this helps. Let me know if more details is needed or if I am misunderstanding your intent.

    -Tom

    ChartCountry.png

    ChartCountry.png

    ChartState.png

  • ravibachanagiri Profile Picture
    185 on at

    Thank you Tom for the early reply,

    But my requirement is that I should be even able to open the contacts based on the result .  For example when  I select country as USA and city as Kansas then the result must show all the contacts in that region and then I must be able to select any record and open for instance would like to open Tom Northup from that city.

  • ThomasN Profile Picture
    3,190 on at

    Ravi,

    That is exactly how it works. When you are looking at a view of contact to the far right is the "Chart" pane. Click there and open charts. You will see the chart next to the view. As you click on the section of the chart the view on the left is automatically filtered down to the selection.

    ContactViewChartOpen.png

    ContactViewChartOpen.png

  • ravibachanagiri Profile Picture
    185 on at

    Thank you again Tom,

    But in the above image I can see the both contact and the charts but my requirement is to select the area first (probably lookup or a dropdown)and then open the contact later based on the area.  Did it make sense.

  • ThomasN Profile Picture
    3,190 on at

    Ravi,

    I understand and sorry for the confusion. I get some requirements are very particular, but sometimes what is needed is not worth the effort to create it, when training can provide the same experience.

    Your Needs:

    • User Select Dropdown of Countries
    • See Filtered List of Contacts
    • User Selects Dropdown of States which is child of Country dropdown
    • See Filtered List of Contacts
    • User can select and open a contact form same location

    Views and Charts Provide:

    • User starts with any view (most likely 'Active Contacts')
    • User clicks on Chart to select Chart Location
    • User clicks on Country of interest
      • View/list of contacts show filtered result according to country selected
    • User chooses "State" field from dropdown on Chart
    • Sees count of contacts by State
    • User clicks on State
      • List/View is filtered contacts in that particular state
    • User can click on contact and open contact record from view.

    If this is too much, and you desire dropdowns, the only way to accomplish that is to create custom web resource using code and embed as iFrame in a dashboard. You can edit the tool bar and add some dropdowns, but have never seen that before and would take a lot of code.

    If you have Portals enabled through Dynamics or ADX you could surface one of those pages, but still a lot of configuration.

    Good Luck,

    Tom

  • ravibachanagiri Profile Picture
    185 on at

    Thank's for all the efforts. The problem with the views is that I will endup in creating N no of views for each state and you were referencing to dropdown in chart is it possible to create one  

  • Suggested answer
    PS Profile Picture
    23,577 on at

    You will have to create three new entities in the system of organisation level

    Country (will have one field called name)

    State (will have two fields name and country lookup)

    City (will have three fields name, state lookup and country lookup)

    Now create three lookups in your contact and make them auto populate based on city

    Users will just fill the city on contacts abd state,country will be auto populated

    This will allow you to achieve your objective

  • ravibachanagiri Profile Picture
    185 on at

    Prashant,

    My requirement is to get all the records based on the area selected. Salesperson has a form where They have to select the country and then city, here I want to display all the Accounts or Contacts based on the above selection done.

    Thanks and Cheers.

  • Suggested answer
    PS Profile Picture
    23,577 on at

    Hi Ravi,

    Thats what I am telling you; if you follow my steps stated above.

    Then you add two subgrids each on both 'Country' & 'City' entity of account and contacts. This will show you what you want. Plus you will have to create a quick view form for both country and city having subgrids of account and contact.

    Now on whatever entity your users add country and city, add these quick view forms and they will be able to see all accounts and contacts related

  • ravibachanagiri Profile Picture
    185 on at

    Thank You Prashant.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans