Sync Rule Parameter if reference object exists

Hi!

I am syncing user object to an SQL MA. In one field, i need the Managers employeenumber. So i achieved this with a sync rule Parameter as follows:

[//Target/Manager/employeenumber]

Now there are some user object that have no Manager. It is my understanding that i receive the following eventlog error for that reason:

System.ArgumentException: Cannot deference on non-instantiated Attribute Manager

Can someone give me a hint how i can check if a Manager is present and only then select the employeenumber?

I Vision the following:

IIF(ispresent(//Target/Manager),//Target/Manager/employeenumber,"")

Thanks for your time

Martin



May 2nd, 2014 5:53pm

Hi Sren,

Thanks for your reply. I can see how your solution would work. However, i have a lot of export flows where i need existing data in a different format. I would rather not add a new attribute for all of those cases.

I found the following solution which works great for me:

Instead of referencing the Object/Attribute directly for the Sync Rule Parameter, i use a second activity to get the Managers EmployeeNumber and save that in //WorkflowData. Then i can use //WorkflowData in the SyncRule Activity. That way, the Workflow doesn't seem to care if a Manager exists or not.

  • Marked as answer by MMuellerM 1 hour 14 minutes ago
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2014 5:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics