Input collection: myTrucks2
Year | Make | Model |
2020 | Ford | F150 |
2018 | Chevy | Silverado |
2020 | Ford | F150 |
2020 | Ford | F150 |
2017 | Nissan | Frontier |
2016 | GM | Yukon |
2016 | GM | Yukon |
Output collection: mySolution2
Year | Make | Model |
2020 | Ford | F150 |
2018 | Chevy | Silverado |
2017 | Nissan | Frontier |
2016 | GM | Yukon |
Solution code:
//Create a collection
ClearCollect(myTrucks2,
{Year: 2020, Make: "Ford", Model: "F150"},
{Year: 2018, Make: "Chevy", Model: "Silverado" },
{Year: 2020, Make: "Ford", Model: "F150" },
{Year: 2020, Make: "Ford", Model: "F150"},
{Year: 2017, Make: "Nissan", Model: "Frontier"},
{Year: 2016, Make: "GM", Model: "Yukon"},
{Year: 2016, Make: "GM", Model: "Yukon"}
);
//Duplicate removal code
ClearCollect(mySolution2,ForAll(Distinct(myTrucks2, ThisRecord),ThisRecord.Value));