none
MIM2016 - Functions in Inbound Sync Rule RRS feed

  • Question

  • I know that the Function evaluator is a bit.. ehm.. "quirky". 

    I would like to concatenate two strings in an inbound Sync Rule.

    Currently the Custom Expression looks like this (and it's doing what I expect it to do):

    IIF(IsPresent(Cordless),IIF(Eq(Cordless,"0"),Null(),IIF(Eq(Left(Cordless,2),"00"),Mid(Cordless,3,60),Cordless)),Null())

    However, I would like to concatenate a string with the result of the Mid Function:

    IIF(IsPresent(Cordless),IIF(Eq(Cordless,"0"),Null(),IIF(Eq(Left(Cordless,2),"00"),"46"+Mid(Cordless,3,60),Cordless)),Null())

    This is not a valid expression according to MIM2016.

    Any suggestions, other than using a Rules Extension or actually changing the inbound data?


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!



    Tuesday, March 22, 2016 4:35 PM

Answers

  • Rules Extension it is!

    The Product Group really should review the FIM Functions and the parsing / evaluation code of them. Perhaps in MIM2016 SP1?



    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    • Marked as answer by Leo Erlandsson Wednesday, March 23, 2016 7:33 AM
    Wednesday, March 23, 2016 7:33 AM

All replies

  • Rules Extension it is!

    The Product Group really should review the FIM Functions and the parsing / evaluation code of them. Perhaps in MIM2016 SP1?



    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    • Marked as answer by Leo Erlandsson Wednesday, March 23, 2016 7:33 AM
    Wednesday, March 23, 2016 7:33 AM
  • I just had a similar problem, concat of string and functions in IIF appear to be borked.

    I worked around it with ReplaceString.

    e.g. Your string concat would look like: ReplaceString("46%R","%R",Mid(Cordless,3,60))

    I was using it for homeDirectory paths:

    This was invalid: "\\dfs.domain.name\"+Left(st,3)+"\users\"+accountName

    This worked: ReplaceString("\\dfs.domain.name\%ST%\users\"+accountName,"%ST%",Left(st,3))

    • Edited by Froosh Tuesday, September 19, 2017 4:23 AM Missed a closing bracket
    • Proposed as answer by Froosh Tuesday, September 19, 2017 4:24 AM
    Tuesday, September 19, 2017 4:20 AM
  • Thanks. The PG really should take a look at the Expression Parser in MIMWAL, and see if they can incorporate it for use in the MIM Expression Parser. ;)


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Tuesday, September 19, 2017 6:38 AM