Loading ...
Sorry, an error occurred while loading the content.

23867Re: [Clip] Re: Convert strong with first and last name into two strings

Expand Messages
  • Phil
    Jun 10, 2013
    • 0 Attachment
      Eb, thanks for the suggestions.

      The first suggestion doesn't work, or, I should say, doesn't accomplish what I want to accomplish. I had a wizard with separate fields for first and last names. I was getting tired of copying the first name, then pasting and copying the last name, then pasting.

      I wanted to copy and paste the full name, then parse it out.

      Your second suggestion looks like it fits the bill, and is less awkward than my approach. I will try it. I also see you set it to handle a middle initial if present, ignore otherwise. I need to concatenate the middle initial to the first name, but bet I can figure that out.

      From: Eb <ebbtidalflats@...>
      To: ntb-clips@yahoogroups.com
      Sent: Monday, June 10, 2013 9:58 AM
      Subject: [Clip] Re: Convert strong with first and last name into two strings


      I know you figured it out, but...

      There are better ways to separate multi-word wizard entries.

      1. Possibly the best way, a two wizard assignment:
      ^!Set %first%=^?{Enter first name}; %last%=^?{enter last name}

      2. If you don't like multi-part wizards, an easy way to separate space-delimited strings is to use a space-delimited array:

      ^!SetListDelimiter ^%space%
      ^!SetArray %nameparts%=^?{Enter name}
      ^!Set %first%=^%nameparts1%
      ^!Set %last%=^%nameparts^%nameparts0%%
      ^!If ^%nameparts0%<>3 SKIP
      ^!Set %mi%=^%nameparts2%
      ^!SetListDelimiter ;

      Note: the last line is needed only if you make other array assingments following the above code. Match the delimiter to your needs.



      --- In ntb-clips@yahoogroups.com, "Stephen" <freetochoose@...> wrote:
      > ...
      > accept input of a name, e.g. John Altavilla and convert it into two variable Last and first.
      > ...
      > ^$StrPos("SubStr";"Str";CaseSensitive)$
      > ...
      > ^$StrCopy("Str";Index;Amount)$
      > to pull out the first name, and again to pull the last name.

      [Non-text portions of this message have been removed]
    • Show all 5 messages in this topic