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