Hi all,
I am using the following code to try and extract the second word of a string.
Ok, so for example the full name is Joe Bloggs the result of the above code is "e Bloggs" instead of just "Bloggs"
What am I doing wrong? I'm using the same code to extract the first word of the string and that's working fine, see below.
This always results in showing what I need, "Joe"
Any help would be great, many thanks.
I am using the following code to try and extract the second word of a string.
Code:
global stringvar secondName := {user.us_fullname};
If InStr(secondName, " ") > 0 Then secondName := Right(secondName, InStr(secondName, " "));
Ok, so for example the full name is Joe Bloggs the result of the above code is "e Bloggs" instead of just "Bloggs"
What am I doing wrong? I'm using the same code to extract the first word of the string and that's working fine, see below.
Code:
global stringvar firstName := {user.us_fullname};
If InStr(firstName, " ") > 0 Then firstName := Left(firstName, InStr(firstName, " "));
This always results in showing what I need, "Joe"
Any help would be great, many thanks.