Help With Concat - Generating UserID - InfoPath Dev
in

InfoPath Dev

Help With Concat - Generating UserID

Last post 01-28-2010 11:06 AM by ErnestoM. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-28-2010 06:39 AM

    Help With Concat - Generating UserID

    Hello,

    I'm trying to generate a username based off of three fields; first name, middle initial, last name. The generated username would fill in a fourth filled call "Generated ID".  The kicker is that I only need the first six characters of the last name and only the first character of the middle initial and first name.  And of course if the lastname is less than six characters it should just take the first four or five.  Is that possible?

  • 01-28-2010 06:50 AM In reply to

    Re: Help With Concat - Generating UserID

    Yes, it's possible with concat and substring. See the attached sample.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-28-2010 07:13 AM In reply to

    Re: Help With Concat - Generating UserID

    Awesome!  Thanks a lot!  Just so I understand....

     concat(substring(field3, 1, 6), substring(field1, 1, 1), substring(field2, 1, 1))

    In the section where your defining what you want from the field, i.e. (field3, 1, 6), your basically saying the first through sixth character.  Correct?

     Thanks again for the help.  I've found that InfoPath is really powerful if you can just learn how to use it!

  • 01-28-2010 11:06 AM In reply to

    Re: Help With Concat - Generating UserID

    Right, substring will allow you to select a certain number of characters from a field.

    Check out substring before and substring after if you have a specific character you need to look for. For example, for ernesto@qdabra you can do substring-before and get ernesto and substring after and get qdabra.

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.