Strings in datasets containing [ symbols - syntax error


A robot that has been running for months returned a new error yesterday - I know the cause, but am looking for a good solution.

A DataRow is passed to a module - its contents are :-

“Third Party Contact”,
“Third Party Company Name”,
“Test Address1”,
“[Nathalie - 01234 123456]”,
“Test Address 3”,
“Address 4”,


In a Type activity, this is the payload dataRowArg.Item(“Third_Party_Address_Line_2”).ToString.ToUpper+"[k(enter)]"

The Third_Party_Address_Line_2 contains [Nathalie - 01234 123456] and gives the error “Syntax error in the key list. Please check the special key string syntax.” on this activity

If I remove the from the string, it works fine. The data is coming from a database, so I can prevent these, but is there a way to stop this happening globally?

Regards, Stewart