Announcements
Hello, I have an entity called Prospect. In that entity, I have a field/column called Country (dropdown Choice field synced with Global Choice named 'Country'). Once the user selects the country from the list, there is another field called Affiliations which should show which countries are affiliated with that selected country.
I have the list of countries affiliated with each other based on The 27 Sub-Regions of the World - OBJECTIVE LISTS
For example, if I select United States in 'Country' field, 'Affiliations' field should show Canada, Australia, New Zealand, Great Britain, and Ireland.
1) Should 'Affiliations' field be synced with the same Global Choice 'Country'?
2) How can I accomplish this using JS? I know I can hard code it as below but it's obviously not optimal:
var countriesAssocitions = {
//Afghanistan
4: [139, 198],
//Albania
8:[158],
//Algeria
12: [17],
//American Samoa
16: [155, 47],
//Andorra
20: [32],
//Angola
24: [140],
//Antigua and Barbuda
28: [47],
31: [21]
//etc
}
where every value on the left represents the index of a country from the global choice 'Country' and the indices on the right are those of the affiliated countries. \
Is this the right way to go about it or is there a better way such as creating an array for every group of affiliated countries (there are 27 groups)?
Hello,
It looks like that that's the perfect usecase for the dependent optionset - www.crmanswers.net/.../dependent-option-set-manager.html
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,186 Super User 2024 Season 2
Martin Dráb 227,996 Super User 2024 Season 2
nmaenpaa 101,148