Hello all,
I am looking to reverse a full name, I need the output as shown in Actual name. Can anyone help.
Full name | Actual Name |
John Smith Paul | Paul Smith John |
Alex Stuart | Stuart Alex |
Hello all,
I need the reversal to happen based on condition, say whenever country = China,Singapore,Hong kong.
Full name | Actual Name | Country |
John Smith Paul | Paul Smith John | China |
Alex Stuart | Stuart Alex | Singapore |
@Saravanan13 One way of doing this
Hi, @Saravanan13
I assume that the name for your specified region only has a maximum of 6 words, but in reality it is not that many. Therefore, you can simplify the logical level of the formula.
Trim(IIF([Country] in ('China', 'Singapore', ',Hong kong'), GetWord([Full name],5) +' ' + GetWord([Full name],4) +' ' + GetWord([Full name],3) +' ' + GetWord([Full name],2) +' ' + GetWord([Full name],1) +' ' + GetWord([Full name],0), [Full name]))
Or like:
Trim(IIF([Country] in ('China', 'Singapore', ',Hong kong'), GetWord([Full name],2) +' ' + GetWord([Full name],1) +' ' + GetWord([Full name],0), [Full name]))
Their first and last names are all ordered the same? Or is it always the last name word gets swapped with the first name word? Because names can get complex if the conditions aren't limited, and some may not return what you want...