Input collection: myCities55
City | Continent | Country |
New York | North America | USA |
London | Europe | United Kingdom |
Kyoto | Asia | Japan |
Osaka | Asia | Japan |
Los Angeles | North America | USA |
Paris | Europe | France |
Birmingham | Europe | United Kingdom |
Output value: mySolution55 (unique Country names)
Result |
blank |
USA |
United Kingdom |
Japan |
France |
Solution code:
//Create a collection
ClearCollect(myCities55,
{City: "New York", Country: "USA", Continent: "North America"},
{City: "London", Country:"United Kingdom", Continent: "Europe"},
{City: "Kyoto", Country: "Japan", Continent: "Asia"},
{City: "Osaka", Country: "Japan", Continent: "Asia"},
{City: "Los Angeles", Country: "USA", Continent: "North America"},
{City: "Paris", Country: "France", Continent: "Europe"},
{City: "Birmingham", Country:"United Kingdom", Continent: "Europe"}
);
//Duplicate removal code
ClearCollect(mySolution55, {Result: Blank()});
Collect(mySolution55,Distinct(myCities55,Country));