ADXStudio Lookup Filtering – Filter DropDownList in ADXStudio

As we all know that ADXStudio has one of the intresting Out Of Box feature to Convert CRM Lookup into DropDownList on ADXPortal Entity Form, but the major limitation of this feature is, it stop filtering data if you have applied Lookup Filtering on CRM Lookups in CRM.

So if I want to Filter my two lookup fields on ADXStudio Portal Entity Form, It doesn\’t work if we will convert them into DropDownList using Entity Form Metadata. i tried to figure out so many alternatives ,Also asked on ADXStudio Community Forum, And I found its the Limitation of converting Lookup into DropDownList in ADXStudio. Hope will get the solution in next ADX release

So only solution that i came into my mind is to use DropDownList Filtering using JQuery in Entity Form to achieve the same.

Here what i was doing…

I had two Lookups on my CRM Case Entity Form (State and City) and I converted them into DropDownList using Entity Form Metadata.  And below is the code through which i filtered my City DropDownList based on State DropDownList:

We can write this JQuery in \”Custom JavaScript\” section of AdxStudio Entity Form in CRM.


    $(function ()
    {
        
        var $state = $(\’#state\’);
        var $city = $(\’#city\’);

        var $cityList = $city.find(\’option\’).clone();

        var stateandcity =
        {
            MP: [\”Gwalior\”, \”Indore\”, \”Bhopal\”, \”Other\”],
            UP: [\”Noida\”, \”Agra\”, \”Lukhnow\”, \”Other\”],
            Mahrashtra: [\”Nagpur\”, \”Pune\”, \”Mumbai\”, \”Other\”]
        }

        $state.change(function ()
        {
            var $selectedState = $(this).find(\’option:selected\’).text();
            $city.html($cityList.filter(function () {
                return $.inArray($(this).text(), stateandcity[$selectedState]) >= 0;
            }));
        });
    });


Here is the Output of the above Code:

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

4 thoughts on “ADXStudio Lookup Filtering – Filter DropDownList in ADXStudio

  1. Hi Arpit,If my stateandcity there is no MP,UP,Mahrashtra but inside values is available then how can i filter \”Gwalior\”, \”Indore\”, \”Bhopal\”, \”Other\”,\”Noida\”, \”Agra\”, \”Lukhnow\”, \”Other\”,\”Nagpur\”, \”Pune\”,\”Mumbai\”, \”Other\”

    Like

  2. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

  3. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: