How to reverse a name
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Saravanan13
8 - Asteroid
‎11-12-2023
11:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 |
Labels:
- Labels:
- Preparation
6 REPLIES 6
‎11-12-2023
11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 |
binuacs
21 - Polaris
‎11-12-2023
01:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Saravanan13 One way of doing this
CoG
14 - Magnetar
‎11-12-2023
02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ds_tomalexsmith
8 - Asteroid
‎11-12-2023
03:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
flying008
15 - Aurora
‎11-12-2023
04:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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]))
17 - Castor
‎11-12-2023
05:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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...
Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
