Removing duplicate values from a formula field
Hello!
I have a formula that says:
var text MultiInTextFormat = ToText([Breeds]);
List(";",
If(Contains($MultiInTextFormat, "Yorkie"), "Dog"),
If(Contains($MultiInTextFormat, "Doberman"), "Dog"),
If(Contains($MultiInTextFormat, "Clydesdale"), "Horse"),
If(Contains($MultiInTextFormat, "Amnesia"), "Cat"),
If(Contains($MultiInTextFormat, "Hound"), "Dog"),
If(Contains($MultiInTextFormat, "Persian"), "Cat"),
If(Contains($MultiInTextFormat, "Morgan"), "Horse"),
If(Contains($MultiInTextFormat, "American Warmblood), "Horse"))
Often times, this formula generates a list like this:
Dog;Dog;Dog or Cat;Cat;Dog;Horse
How can I remove the duplicates from that list? Can I add something to this formula? I'm ok with adding a new field that will remove the duplicates, I just don't know how to do that.
Also, how can I get that de-duped list to put each value on a separate line within the field (instead of a string separated by ";")
So if the values selected in [Breeds] are
American Warmblood;Hound;Morgan;Persain
I want the field to look like this:
Cat
Dog
Horse
Thank you for any assistance!!
------------------------------
Karen Henke
------------------------------