Extracting last 5 characters - InfoPath Dev
in

InfoPath Dev

Extracting last 5 characters

Last post 05-08-2009 07:03 AM by Samir Farid. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-08-2009 06:35 AM

    Extracting last 5 characters

    I am using the GetUserProfileName webservice to the UserName (which in our case is the NetworkID). we have some employees with a network ID that is 5 digits (xxxxx=their employee number) and other employees have a network ID that contains a 3 character prefix before their employee number (P00xxxxx). I want to show the 5 digit employee number on my form. I thought that I'd be able to use the substring functoin, but I can't figure out how to do this. I thought that this would be simple, but I'm having a brain cramp and would appreciate some help.

    Thanks

    Dean 

    Dean
    Charlotte, NC
    Filed under:
  • 05-08-2009 07:03 AM In reply to

    Re: Extracting last 5 characters

    Hi Dean,

    You can get the last five positions of the Employee number by using a combination of substring and string-length:

    Example: substring(EmployeeNumberfield; string-length(EmployeeNumberfield) - 4; 5)

    If you only want to show the employee number that are 5 positions long, then it will be much easier to do that in code with an if-statement. 

    Hope this helps,

    - Samir -

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