Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help seperating names into variables
#1
Relatively new to this program, having fun learning!

Question:
Looking for a way to copy a persons first and last name from a table, seperate them, and store into 2 variables for output in seperate places.

example:
s= "John Doe"

Need to find a way to convert to:
s1="John"
s2="Doe"

I know there's gotta be an easy way to achieve this that I'm overlooking. I tried the help file and the forums and am drawing a blank. Any help would be greatly appreciated!!!! Thanks!!!
#2
if they are all like that, you can do this.
Code:
Copy      Help
str a b
_s= "John Doe"
a.gett(_s 0 " ")
b.gett(_s 1 " ")
out _s
out a
out b

if they can vary, look up 'get token' in the qm help or 'gett' for more info.
An old blog on QM coding and automation.

The Macro Hook
#3
Thanks Ken!!!!!! That works perfectly!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)