In this article I explain how to create cascading dropdown based on state and city.
I created State, City and Address list with lookup.
Open Address list, Click on “Customize Form” under List tab. It will open InfoPath designer, now we can customize List Form.
Right click on City dropdown list control -> select Drop-Down List box Properties.
In Data Source -> click “Add” button.
In Data Connection wizard, click “Next” button
Select “SharePoint library or list” -> Click “Next” button.
Enter “SharePoint site details” -> Click “Next” button.
Select a list of library, choose “City” -> Click “Next” button.
In select fields: select State, City Name and ID -> Click “Next” button.
Next screen, click “next” button.
Leave the default name (City1) and click “Finish” button.
We can see now Data Source of Drop-down list box is City1
Click on tree button to select XPath, in Entries section.
Click “Filter Data” button.
Click “Add” button in Filter Data
Choose a field or group... in the first drop-down list.
Choose City1 Data source and select State -> click “Ok” button.
Now select a field or group… in the last drop-down list
Select Main as Data Source then choose State in data Fields -> click “OK” button
Click “OK” to close specify Filter Conditions dialog
Click “OK” to close Filter Data dialog
Click “OK” to close Select a Field or Group
In Drop Down List box properties, choose d:ID in Value: section -> click “OK” to close this
Now Save and Publish the InfoPath Form view. Go to Address list and Click new item.
Here we can see only state related cities in the dropdown list.