logic issue in ACC | Community
Skip to main content
Level 3
May 31, 2024
Solved

logic issue in ACC

  • May 31, 2024
  • 1 reply
  • 1132 views

i am trying to replace (') in field which have value in text format and have special character as(')  need to replace it with space, while using replace function in Enrichment activity(editing formula using expression) e.x.Replace(@fa,'\'',"'") , its giving error as unterminated string , Do we have any other way to required . Thanks in Advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AkshayAnand

Hi @at7140 

 

You can use JavaScript code to replace your special characters.

var Name = 'Ak\'sha\'y'; logInfo("Old Name "+Name); var newName = Name.replace(/'/g,' '); logInfo(newName);

 

Regards

Akshay

1 reply

AkshayAnand
Community Advisor
AkshayAnandCommunity AdvisorAccepted solution
Community Advisor
May 31, 2024

Hi @at7140 

 

You can use JavaScript code to replace your special characters.

var Name = 'Ak\'sha\'y'; logInfo("Old Name "+Name); var newName = Name.replace(/'/g,' '); logInfo(newName);

 

Regards

Akshay

at7140Author
Level 3
June 11, 2024

Hi @akshayanand 

Thanks this worked , but just curious to know , can we do same by any other way using any Formula using expression available in tool?

Level 3
June 17, 2024

Hi @at7140 , yes you can.
Use Replace(<string>, "'", " ")