IceBox Posted December 16, 2004 Report Share Posted December 16, 2004 Hello everyone. I am stuck… I need to copy a full name from one screen and enter it into 2 different fields on another screen. On the first screen, the name is always in the same spot on the screen in the form: FIRST M LAST If there is no middle initial, the form is: FIRST LAST Here is how far I have gotten: I can copy the entire name and then “Right Trim” to account for different name lengths. I then need to split the full name into 2 separate variables, first name and last name. I never need the middle initial. Using the command “Set Integer – Get position of Text in a Text Variable”, I can locate the space between the 2 names, and using that number, the rest is fairly simple to work out. However, when the name includes a middle initial (90% of the time), there are 2 spaces. I am assuming that Macro Express will set the integer variable based on the first space it finds. If that is the case, the first name will be very easy to isolate. But how do I know if the last name starts in the next character spot, or 3 spots over? I sure hope I explained that well. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
jowensii Posted December 16, 2004 Report Share Posted December 16, 2004 Maybe try another “Set Integer – Get position of Text in a Text Variable” after you have extracted the first name. Then try "If Variable %N1% > 0" If it's greater than 0, then you know there is a middle initial and you can then remove it and trim the remaining text. Quote Link to comment Share on other sites More sharing options...
IceBox Posted December 16, 2004 Author Report Share Posted December 16, 2004 That makes lots of sense. Thank you so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.