We recently upgraded to SP11 (CPS 12.0.11 + CCC Basic 1.3 + CCC 9.1) and are experiencing issues with the ADD_FORM_COMP not behaving properly, as documented in a number of posts on this forum. For those interested in partially fixing this problem without waiting for SP12, read on.
In our case, it turns out the problem lies with the index parameter in the ADD_FORM_COMP function. Passing a numerical index results in the default situation where the form is added to the end of the update, which is what happens if the index is out of range or the value is unrecognized. In our case, and I'm not sure if this is true for everyone, the AFTER_CURRENT value works just fine.
A majority of the inconvenience for our providers is with the buttons on the bottom of the CCC forms. It turns out those can be fixed, because instead of using AFTER_CURRENT, the CCC forms are translating the after_current parameter into an index-based insert. You can make the changes below to avoid this behavior:
Edit the file Client\CCC\CCC-fndef6-B.ccc and change the following lines (starting at line 677):
if match(j,c[2])=0 then
add_form_comp(c[1],c[2],str(insertpos),"OPEN") else
open_form_comp(c[1] + "\\" + c[2]) endif
With this code:
if match(j,c[2])=0 then
if d=="AFTER_CURRENT" then
add_form_comp(c[1],c[2],"AFTER_CURRENT","OPEN")
else
add_form_comp(c[1],c[2],str(insertpos),"OPEN")
endif
else
open_form_comp(c[1] + "\\" + c[2]) endif
Of course you have to restart the CPS client for changes to take effect. I would not be surprised if there are other places in the CCC form suite where a similar fix could be used.