caofrancoso
(Caio Augusto Oliveira Françoso)
December 2, 2023, 4:05pm
1
I have a problem, my source of information only has the full name, what is the best way to capture only the first name and to capture the rest of the name (surname).
For example:
current name variable: Caio Augusto de Oliveira Francoso
Firstname: Caio
Last name: Augusto de Oliveira Francoso
kjakubiak
(Kamil Jakubiak)
December 2, 2023, 4:24pm
2
Hi Caio,
I would try to use Split
operation to extract necessary information.
To extract firstname it would be pretty easy as you can use space as delimiter and take first item from the array.
With rest it might be a mor tricky as I suspect alnumber of last names can be different for different users. If you are able to defina what is expected maximal number of lastnames you can try First Valid
eg. 5 times to check all possible lastnames.
1 Like
MVKR7T
(Krishna Mummadi)
December 2, 2023, 7:57pm
3
Hi @caofrancoso
As @caofrancoso mentioned, you can use split Transform.
We can split with blank space, but the problem is what if user firstName is Caio Augusto not just Caio . How do you know that ?
It would be great if firstName and lastName is separated with comma.
Thanks
Krish
1 Like
caofrancoso
(Caio Augusto Oliveira Françoso)
December 3, 2023, 2:48pm
4
It was successful to capture the first name. I would like to concatenate the transforms of “split” + “normalize names”, is it possible?
{
"name": "Split First Name and normalize - API HR”,
"type": "normalizeNames",
"attributes": {
"input": {
"type": "split",
"attributes": {
"delimiter": " ",
"index": 0,
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "API HR",
"attributeName": "Complete_Name"
}
}
}
}
}
}
kjakubiak
(Kamil Jakubiak)
December 3, 2023, 3:21pm
5
Yes you can do that like this.
caofrancoso
(Caio Augusto Oliveira Françoso)
December 3, 2023, 4:30pm
6
unfortunately this transform is giving an error when trying to publish
kjakubiak
(Kamil Jakubiak)
December 3, 2023, 4:46pm
7
"name": "Split First Name and normalize - API HR”,
Last quot sign is wrong it should be
"name": "Split First Name and normalize - API HR",
this one is correct.
1 Like
caofrancoso
(Caio Augusto Oliveira Françoso)
December 3, 2023, 6:13pm
8
thank you very much! It’s perfect now!
system
(system)
Closed
February 1, 2024, 6:13pm
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.