I'm not clear on what exactly you are trying to do, but the METADATA_SETASSN function is passed an two URIs, that of the object whose association is being modified, and the object being associated. It is additionally passed the name of the association and a modification (append, merge, modify, remove or replace). So, if I had an object "Object A" associated with a single object "Object B" through association "Assocation1", and I wanted to replace this association to "Object B" with one to "Object C" I could use METADATA_SETASSN with the REPLACE or MODIFY mod: metadata_setassn(object-a-uri,"Assocation1","REPLACE",object-c-uri); This replaces the association1 to object b with an assocation1 to object c. If I wanted to retain the object b association I could use APPEND or MERGE to add an association to object c. If I have multiple objects associated with object A through association1 and I want to replace B with C and leave the rest, I would use a REMOVE using the object-b-uri and APPEND or MERGE with object-c-uri, or I could use REPLACE and pass all the existing URIs except object-b-uri, instead adding the object-c-uri.
... View more