AnsweredAssumed Answered

How does ImportXml determine how to handle new/changed object?

Question asked by steffenk on Nov 2, 2020
Latest reply on Nov 6, 2020 by steffenk



I am using ExportXml in one AF Database to export Event Frames, and then importing the same Event Frames into another AF Database using the ImportXml function. I am using the PreserveUniqueIDs PIImportMode together with AllowCreate, AllowUpdate and AutoCheckIn. 


This is working fine, and the ID's seems to be preserved for most event frames, but I do see that for child event frames I am not able to preserve the ID's. Is this as expected, or should I always be able to preserve id's? 


Next thing is that I do changes to an event frame, it will be exported, and then again imported in the other database using ImportXml. This updates the event frame on the other side correctly if I change for instance an attributes value.


If I have changed the name of the event frame, however, it will create a new event frame with the new name, but with a new auto generated ID. Then I have "duplicate" event frames with different names, which I want to avoid. How does the ImportXml function actually determine what to do in such cases? Does it use the name of the event frame to detect whether or not it should make a new object, and not the ID? 


If there is some documentation I have missed on this issue, could someone direct me?