Forum Discussion
MichaelTamoush
4 years agoQrew Captain
In your formula field that creates 'JohnSmith' add this
Trim([Rest of Formula])
The trim cuts off all spaces front and back.
------------------------------
Mike Tamoush
------------------------------
Trim([Rest of Formula])
The trim cuts off all spaces front and back.
------------------------------
Mike Tamoush
------------------------------
ChrisNewsome
4 years agoQrew Captain
so your suggestion is to just eliminate all spaces for the purpose of checking uniqueness? hmm... simple, I'll try that! (headslap) the best solutions are the simplest...
------------------------------
Thanks,
Chris Newsome
------------------------------
------------------------------
Thanks,
Chris Newsome
------------------------------
- MichaelTamoush4 years agoQrew CaptainNot all spaces (I realized I wrote JohnSmith instead of 'John Smith'). Trim does not take spaces out from the middle of words (Like 'Van Halen'), It simply removes any leading and trailing spaces.
So: 'Van Halen___' becomes 'Van Halen'.
Though, what you mentioned isn't a bad idea either. You can use SearchandReplace and replace every space with a blank...and just have it be one run on word...that way lazy employees can't start adding extra spaces to the middle...
------------------------------
Mike Tamoush
------------------------------- ChrisNewsome4 years agoQrew CaptainGreat! This was a simple and elegant solution, I'll post back when I've implemented it, thanks!
------------------------------
Thanks,
Chris Newsome
------------------------------ - ChrisNewsome4 years agoQrew CaptainSo I'm curious, how would SearchandReplace work? I've never used that function before.
------------------------------
Thanks,
Chris Newsome
------------------------------- MichaelTamoush4 years agoQrew CaptainThis would replace spaces with nothing (note i Have a space in the first set of quotes:
SearchandReplace([My Field], " ", "")
So that says, search My Field for any space, and replace it with nothing.
Quickbase's description below.
SearchAndReplace (Text textToSearch, Text searchText, Text replacementText)
Description: Replaces ALL occurences of a given search text with the replacement text. Search is case sensitive.
Example: SearchAndReplace("John Smith", "John", "Jane") returns "Jane Smith"
------------------------------
Mike Tamoush
------------------------------