String manipulation in an auto field

I need to create an automatic CPF field without punctuation or dashes, just the digits. I tried to do it as shown in the screenshot but I get this error message. I searched for more information about automatic fields that might help me, but without success…

Hi @GabrielBrandao1618!

When checking the error message, we can see that the string data type does not have a .replace() method. With that in mind, while reviewing the documentation on Data Entity, I found that this formula field uses C#, not JavaScript.

The thing is, C# is case sensitive, so in order to call the character replacement method in this language, you need to declare it as .Replace(), as shown in the String.Replace Method documentation provided by Microsoft.

So, I believe that by adjusting the code to C#, this error should be properly resolved!

Lucas Palhano Fonseca | Field Software Engineer

I tested it here and that error is no longer occurring. Thanks for the help and for providing a detailed explanation!