Toll Free:

1800 889 7020

Does Replace a Special Character With Similar Character!

Overview: Special Character With Similar Character

In any kind of File Integration (Export/Import of a file) in Business Central services, it is often required for the developer to check the data before whether they contain any special characters which can lead to a wrong file generation.

So, in most of the cases, it is required to replace any special character i.e., Comma (,) or Dot(.) with space or any other character.

For example, if we need to export a CSV file from BC containing master data information or journal entries, we need to be careful about Comma (,) coming into any cell value. Otherwise, the cell will move to next because of the comma.
special-character-step1
After export,
special-character-step2
So, to replace this comma we can use a function called CONVERTSTR.
String: = CONVERTSTR (String, FromCharacters, ToCharacters)

Example:

String: = CONVERTSTR(String,’,’,’-’); Here I am replacing comma with ‘-‘

special-character-step3

The new value will be:
special-character-step4

Conclusion

That is how we can replace commas or any similar special character in a field by using this string function CONVERTSTR.

felipe-hicks

Felipe Hicks

Experienced IT professional with a strong background in software development and a demonstrated history of working in the outsourcing and offshoring industry. Skilled in developing scalable applications, implementing modern architectural patterns, and leveraging cloud technologies. Proficient in cross-platform development and passionate about driving innovation and delivering tailored solutions. Committed to staying updated with emerging technologies and collaborating effectively to achieve project goals and exceed client expectations

Scroll to Top