Forum Discussion
ChrisNewsome
Qrew 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
------------------------------
MichaelTamoush
4 years agoQrew Captain
Not 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
------------------------------
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
------------------------------- ChrisNewsome4 years agoQrew CaptainJust a follow up... i made new fields (Customer Name Check & Opportunity Name Check) and set them to be unique, using the "SearchAndReplace" function as described above. It seems to work perfectly in my test drives. I guess now we're going to see if I get any more duplicates or employees complaining, and I'll know for sure. If anything seems to fail about this, I'll post here again, otherwise it worked great! Thanks for the simple solution!
------------------------------
Thanks,
Chris Newsome
------------------------------