In my database I have a computed column that concatenates two fields to create an onscreen display name. The formula for the computed column is (([LastName]+', ')+[FirstName]).
This formula works fine except for situations where there is a real last name but the first name is “-“, a hyphen. From a data perspective, this is acceptable in some situations. In this cases, the name displays as “Smith, - “. In situations like this, where there is no real first name, we don’t want the comma and hyphen displayed. It should display as “Smith “.
In my computed field, how do I build in some logic to test for a hyphen in the first name and, if it exists, build the display name accordingly?
1 Answer