
Announcements
We have a Term Set where we list all our partners and some of them have an ampersand (&) in their name and have a list with a Managed Metadata column using that Term Set.
When manually adding new entries to that list: no problem at all, but we also wanted to add items to that list via an automated way for bulk upload. In order to realize that, you need to know the GUID of the Term so that you can combine that with the label name of the Term set to add an item to the list.
This is the URL we used to obtain the Term's GUID from the TermStore:
So far so good, until you hit a name with an ampersand in it, like e.g. 'Apples & Bananas'.
Being 2023, one would expect that Power Automate would do a proper conversion/encoding of special characters, but that's not the case (still stunned, after > 30 years in the ICT-business that these special characters continuously need special handling everywhere and that pretty much everybody always need to take this into account when creating flows, interfaces,.... but that's another discussion 😉 )
Anyway, did a whole lot of research and testing with different combinations:
Spent several hours on it this morning, but all to no avail 😠
So I fetched the entire list and pasted it into Notepad++ and noticed that the ampersand looked 'quirky':
Completely different from a manually entered ampersand:
And also in Power Automate this is shown 'differently':
Looked at that character in a Hex Editor (XVI32):
And that's the 'FULLWIDTH AMPERSAND':
So I did a replace function to replace the 'normal' ampersand in this case with this special one by doing some copy & pasting in Notepad++ and afterwards copied it into Power Automate.
And guess what?
I'm able now to find the GUID of a term by label name and use the name and GUID combination to add new items to my list, but it took me the better part of an entire day to figure this out 😩
But would like to know if there's somebody out there having similar experiences with this and if there are (hopefully) better ways to achieve this?
Most useful sources I consulted from the several dozen ones I consulted during my quest