This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Merge action, how does it work?

fli - Thursday, November 15, 2012 12:16 PM:

Hi forum members,

I am working on some AML that should, either (if an item meets criteria ) "update" or (if NO item meets criteria) create an Item

The criteria is:  Item of type= Activity, with two specific Items, as properties.

Problem: The following AML creates an new Item every time it is run? 

 

 

<AML>
<Item type="Activity" action="merge" where="D_item='29A07AADDD1847E59A9961F347A7460D'  and S_item='41873279777B4439BDAB157E65B865F0'" >
<D_item>29A07AADDD1847E59A9961F347A7460D</D_item>
<S_item>41873279777B4439BDAB157E65B865F0</S_item>
</Item>
</AML>

I have had some success achieving the functionality applying the following AML,
which creates an Activity with "proj_num"= 26 If NO Activity with "proj_num"=27 exists 
<AML>
<Item type="Activity" action="merge" where="proj_num='27' "
<proj_num>26</proj_num>
</Item>
</AML> 

 

 
Aras ftw!, 
Thanks - br Christoffer

 



Dave_Rollinson - Tuesday, November 20, 2012 6:25 AM:

Christoffer

Is the "where" attribute in your AML able to find a single Item? I think if not it will do an "add".