October 11, 201114 yr I've spent a lot of time searching for options on auto formatting "names" when entered into a record (i.e. ensuring that names are entered with correct case etc). I'm now familiar with many options from Proper function to "Better Proper" custom functions etc. Further I understand that you can never cover every possible scenario of case usage within names. So, I've decided to take another route, it seems simple, but I can't figure out how to do it. What I'm trying to do: I need a script step that will simply "catch" any name field that does not start with an uppercase letter. At that point I'll just have custom dialogue pop up that says "Double check last name...you may have missed typed" (or something to that effect). I'm versed enough to handle all of the script except the "catch" portion. I can't figure out the correct statement to catch the first letter being lowercase? Any/all help is appreciated. Thanks.
October 11, 201114 yr Let( x= Left( last name; 1) ; Exact( x; Upper( x) ) ) The result will be 1 if first letter is uppercase, 0 if not.
October 11, 201114 yr The result will be 1 if first letter is uppercase Not exactly - for example, "7mith" will also return True.
October 11, 201114 yr Author Fitch...thank you that works great. I also appreciate the comment about the numeric and/or special character comment, if anyone reads this and has a tweak that would catch non-alpha and/or special characters as well those suggestions are welcome.
October 11, 201114 yr You can look at it from the opposite direction: Let ( firstChar = Left ( LastName ; 1 ) ; Exact ( firstChar ; Lower ( firstChar ) ) ) will return 1 (True) unless the first character is a genuine upper-case character.
Create an account or sign in to comment