Home

Results 1 to 8 of 8

Thread: 2 Surnames being Added to eDir when HR sync runs

Threaded View

  1. #8

    Re: 2 Surnames being Added to eDir when HR sync runs

    Quote Originally Posted by caseosborne View Post
    Hello,
    We have setup sync feed so changes in HR are picked up and modify current user attributes. One of these happens to be Surname. Some people get married or divorced and change Surname. What we are seeing is the new Surname is being added as another Surname and not overwriting the current value. Since surname is base schema and is multi-valued is there a way to make sure the new Surname is inserted and the old one is removed? Here is code we are using: Trying to clear the dest attribute before reformat the current op attribute and using that.
    <if-op-attr name="Surname" op="changing"/>
    </and>
    </arg-conditions>
    <arg-actions>
    <do-clear-dest-attr-value name="Surname" when="before"/>
    <do-reformat-op-attr name="Surname">
    <arg-value type="string">
    <token-upper-case>
    <token-substring length="1" start="0">
    <token-op-attr name="Surname"/>
    </token-substring>
    </token-upper-case>
    <token-lower-case>
    <token-substring start="1">
    <token-op-attr name="Surname"/>
    </token-substring>
    </token-lower-case>
    </arg-value>
    </do-reformat-op-attr>
    </arg-actions>

    Also, have tried to set local variable for new Surname, strip the current op attribute, and then use the lv to set the dest attribute, but it returns blank value when trying to set it as the op attribute:

    <if-op-attr name="Surname" op="changing"/>
    </and>
    </arg-conditions>
    <arg-actions>
    <do-set-local-variable name="lv_newSurname" scope="policy">
    <arg-string>
    <token-op-attr name="Surname"/>
    </arg-string>
    </do-set-local-variable>
    <do-strip-op-attr name="Surname"/>
    <do-set-dest-attr-value name="Surname" when="before">
    <arg-value type="string">
    <token-local-variable name="$lv_newSurname$"/>
    </arg-value>
    </do-set-dest-attr-value>
    </arg-actions>

    Thank you!
    Casey
    I had similar issue with number on attributes, that suppose to be "single value" according to business logic, but defined like "multi-value" in schema.
    I use my own "cleanup" policy that change ADD attribute to REPLACE attribute for modify operation.

    <and>
    <if-global-variable mode="nocase" name="gcvReplaceAdd2Set" op="equal">TRUE</if-global-variable>
    <if-operation mode="case" op="equal">modify</if-operation>
    </and>
    <do-for-each>
    <arg-node-set>
    <token-global-variable name="gcvAttributesList"/>
    </arg-node-set>
    <arg-actions>
    <do-if>
    <arg-conditions>
    <and>
    <if-op-attr name="$current-node$" op="available"/>
    </and>
    </arg-conditions>
    <arg-actions>
    <do-set-local-variable name="opGN" scope="policy">
    <arg-string>
    <token-op-attr name="$current-node$"/>
    </arg-string>
    </do-set-local-variable>
    <do-strip-op-attr name="$current-node$"/>
    <do-if>
    <arg-conditions>
    <and>
    <if-local-variable mode="nocase" name="opGN" op="not-equal"/>
    </and>
    </arg-conditions>
    <arg-actions>
    <do-set-dest-attr-value name="$current-node$">
    <arg-value type="string">
    <token-local-variable name="opGN"/>
    </arg-value>
    </do-set-dest-attr-value>
    </arg-actions>
    <arg-actions/>
    </do-if>
    </arg-actions>
    <arg-actions/>
    </do-if>
    </arg-actions>
    </do-for-each>
    Click image for larger version. 

Name:	Capture.PNG 
Views:	7 
Size:	13.5 KB 
ID:	6086
    Last edited by al_b; 14-Jan-2018 at 06:04 PM.
    If you find this post helpful, please show your appreciation by clicking on the star below

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •