This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Synchronization to update only internals and not to touch active externals

I have a CSV sync which contains internal persons, I have also Externals in my One Idenity which should not be updated even if the matching rule matches.

I tried to create a rule in to Synchronization workflow:

isExternal = False or (IsExternal = true and Extidate < GetDate())

So it should update only non-externals and  also not-active Externals. But the "GetDate" -function is not working there? So how I can use the date in that rule?

I'm using version 8.0

  • May I ask, why you do not use a scope definition to limit the matching to only the internals?

  • Good point, I tried to solve the problem with the hard way Slight smile

    That was the solution, thank you!

  • Still about this case. Would it be doable to update some fields based on HR-data's start date, So my goal is to check that if External does not have exit date on his data in 1IM, but in HR CSV data start Date is today, then I would update the 1IM fileds based on data CSV. Otherwise do not update 1IM information.

    So I would need to make a rule to check "both sides" 1IM and CSV file at same condition. Rule should be something like: (Left.IsExternal='False' or Right.CCC_ITActivationDate<= getdate()), but that is not correct format and I don't know what is.

    I tried to create a condition in Mapping, but again faced same issue as above that I don't know how I can compare dates in that condition? (e.g. if CSV's startdate is today)

  • The conditions are not SQL based, so a SQL function like getdate() is not working. What you could do is to create a new scripted variable that fetches the current date.

    Value = DateTime.Now()

    Given, that the variable scripts will be run once at startup you can use this as current date in your conditions.

    In your condition, you can reference the variable with $variablename$.

  • I tried to create a script property in Mapping, this property (CCC_Today) includes the script: return date.Now

    Then in Mapping "condition of use" is clause: (Left.IsExternal='True' and Right.CCC_Today>Right.CCC_Startdate or Left.IsExternal='False')

    But it does not work, it updates everytime the attribute which has the condition. How to date comparision should be done there?

    So my idea was to update externals on when ccc_Startdate is in past, and everytime update internals

  • Try

    (Left.IsExternal='True' and $CCC_Today$>Right.CCC_Startdate) or Left.IsExternal='False'

  • Infact I got it already working, thank you anyway! Slight smile