This first one is simple and will work except it has some flaws.
Substitute ( table::calcField ; table::nameField ; TextStyleAdd ( table::nameField ; Bold ) )
The better option is more complex see below.
Let ( [
string = TextFormatRemove ( Test::Calc ) ;
start = Position ( Test::Calc ; Test::name ; 1 ; 1 ) ;
size = Length ( Test::name ) ;
boldText = TextStyleAdd ( Middle ( Test::Calc ; start ; size ) ; Bold )
Left ( string ; start - 1 ) & boldText & Right ( string ; Length ( string ) - ( start + size - 1 ) )
If you use the substitue make sure to add a text format remove to clear out the last bold name. Also the flaws I was talking about are this will bold any occurance so Ben, Benjamin would retrurn Ben, Benjamin.
Substitute ( TextFormatRemove ( table::calcField ) ; table::nameField ; TextStyleAdd ( table::nameField ; Bold ) )
I like nsabel's Substitute better, but this is what I worked up. It is similar to nsabell's let statement and basically does the same thing.
Let ( [
F1 = TextFormatRemove ( List Field ) ; // Peter, Harry, Lola, Jennifer, Ben, Anita
F2 = Selected Name ; // Ben
F3 = Position ( F1 ; F2 ; 1 ; 1 ) ; // this is the starting position of the highlighted name
F4 = Middle ( F1 ; F3 ; 9999999 ) ; // this is the highlighted name and everything to its right
F5 = Position ( F4 ; "," ; 1 ; 1 ) ; // this finds the position of the first comma after the highlighted name
F6 = TextStyleAdd ( Middle ( F1 ; F3 ; F5 ) ; Bold ) ;
F7 = Left ( F1 ; F3 - 1 ) & F6 & Middle ( F1 ; F3 + F5 ; 999999 )
A HUGE thank you to all who replied to this!
It's such a simple thing to do for a user, improving the visual interface with a simple calc.