Is there any way to call setDependentRelation with combination of 2 field's data

Hello All,

Is there any way we can call setDependentRelation with a combination of 2 field’s data?
for e.g.:
As shown here: https://www.grocerycrud.com/v2.x/docs/set-dependent-relation
I want to load the list of cities after a user selects the Country & County
after the User selects England (country) & Buckinghamshire (county), the form should load the list of cities or towns based on these 2 fields.

thank you in advance.