One method is to determine exactly what you consider suffix data to include, and then do a test on the LastName field to see if it meets both of these conditions:
- Word count of the LastName field is >=2, AND
- [multiple tests for each of your designated: PatternCount ( LastName ; " Jr" ) OR ... etc.
Be sure you include the space before the suffix inside the quoted test text so it will only match when the pattern count text is after the first word of the LastName.
The main limitation of this method is that you must define your list of possible suffixes by testing for each of them within the OR section of the calculated test.
Then, if you get a match, depending on whether you are using an onExit field script trigger, or field definition validation, you can try to force the user to correct it.
I've never had to do this, but a technique springs to mind
For simplicity I shall assume that all suffixes are a single word and that you only looking for them as the last word of the last name field (if this is not the case the technique can be adapted)
so we're interested in Rightwords ( lastName ; 1 )
put all your possible suffixes in a carriage return delimited list: "Jr¶Jnr¶Sr¶Snr… "
then use FilterValues to see if the one exists in the other, thus:
lastWord = RightWords ( lastName ; 1 ) ;
suffixList = "Jr¶Jnr¶Sr¶Snr… " ;
foundSuffix = FilterValues ( lastWord ; suffixList )
( WordCount ( lastName ) >= 2 ) and not IsEmpty ( foundSuffix )
will return a boolean; if you prefer to know the offending suffix, change the last line to:
If ( WordCount ( lastName ) >= 2 ; foundSuffix )