Hello all,
I am looking to reverse a full name, I need the output as shown in Actual name. Can anyone help.
I need the reversal to happen based on condition, say whenever country = China,Singapore,Hong kong.
@Saravanan13 One way of doing this
Here's another method that ran faster for many records on my machine
I don't know if I'm missing something, but the other replies seem to have really overcomplicated this. Hopefully this is what you were looking for 😊
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...