Skip to content
Home » Blog » Can you please translate?

Can you please translate?

Ok, it’s my blog so I get to vent. Here is a fact: 80% of text fields on Notes forms would be improved with an input translation formula. This is the best formula for most cases:

@Trim(@ReplaceSubstring(@ThisValue; @Char(9):@Newline; " "))

Rarely do we really want to allow tabs, leading or trailing spaces in a text field. Sometimes newlines, but the formula is easily adjusted to allow that.

Of the remaining 20% many are identifiers that shouldn’t contain any whitespace.

@ReplaceSubstring(@ThisValue; @Char(9):@Newline:" "; "")

I’m working on a tool called The Developer’s Friend that contains, among other things, some database design reports and fixup tools. I think I’ll add one to list the input translations for all fields so you can easily scan down the list and find ones that need something more than the nothing I see in so many cases.

2 thoughts on “Can you please translate?”

  1. IMHO, this kind of ‘clean-up’ ought to be activable via a tick in the field properties. Would be the ideal place to put it and save us developpers typing/cut/pasting/nerves when reading our code.

    Just an idea

Leave a Reply

Your email address will not be published. Required fields are marked *