Answered Custom Expression for Employee number

  • Tuesday, September 04, 2012 9:56 AM
     
     

    Hello,

    I want to transform some data out of my HR system to use in FIM but I can't work out how to do it. It sounds like it should be a simple thing to do using a custom expression but I have no idea where to start.

    My HR system gives me a value which is the users unique identifier in the form a123456. What I want to do is flow this value to AccountName AND remove the initial letter from this and flow the number only to the employeeID attribute. Is this possible?

    Also, is there a good reference guide for building custom expressions?

    Thanks!

All Replies

  • Tuesday, September 04, 2012 10:46 AM
     
     Answered

    You could go with an Advanced Import Flow Rule for your HR MA and do some RegEx in this. There are plenty of samples for EAF on Bing/Google.

    The regex would be something along the lines of -

    RegEx.Replace(csentry["HrNumber].Value, "^[a-z]{1}", "") to get the employee number (just from the top of my head)

    Hope this helps


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    • Marked As Answer by leemar Tuesday, February 26, 2013 10:44 AM
    •  
  • Tuesday, September 04, 2012 10:04 PM
    Moderator
     
     Answered
    Is the field a fixed length? If so the Left/Right functions will be of help. If not, your options are really Soren's suggestion, a custom workflow activity, or transforming the data in your result set from HR (e.g. if you're getting a database view, add a column lacking the special character).

    My Book - Active Directory, 4th Edition
    My Blog - www.briandesmond.com

    • Marked As Answer by leemar Tuesday, February 26, 2013 10:44 AM
    •