Issue: Scenario is that we want to create a workflow in the portal to populate the 'MailNickname' attribute from the EMail attribute. For example, if the email address is Test1@contoso.com, the MailNickname should be Test1.
Solution: Since there is no 'Length' or 'Find' function in the built in function evaluator we have to accomplish it a bit differently. Here we'll assume everyone in the portal has an @contoso.com or @fabrikam.com email address. Note the length of @contoso.com is 12, and @fabrikam.com is 13 characters.
Destination: [//Target/MailNickname] Value: IIF(Eq(LowerCase(Domain),"contoso"),ReplaceString(EMail,Right(EMail,12,""),"")+IIF(Eq(LowerCase(Domain),"fabrikam"),ReplaceString(EMail,Right(EMail,13,""),"")
Other domains will need to be concatenated in the custom expression appropriately. This will write the MailNickname without the need for powershell custom workflow activities or the FIM WAL.
Tim Macaulay edited Original. Comment: fixed title