Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
setValue(int n, LLValue) for Assoc ? (9.0.0.1-Java LAPI)
Rolf_Poser_(icisuser3_-_(deleted))
Hello:I am trying to do the following to generate an indexed set of Assocs within an Assoc (both types initialised using setAssoc()):int indexnumber;OuterAssoc.setValue(indexnumber, InnerAssoc);This returns an error that set(n,value) is not valid for this datatype, even though the LAPI documentation seems to indicate that setValue(n, LLValue) is valid for type Assoc.Please Help - I am really stuck ! Or is this not valid for an Assoc anyway ?Kind Regards,Rolf Poser.+27-83-680-4250 / rolf.poser@za.didata.com
Find more posts tagged with
Comments
Rolf_Poser_(icisuser3_-_(deleted))
Hello again:I thought that it might help to give the background of what I am trying to do with setValue(int, Value):I am trying to set the values of the fields within a form inside of a workpackage at initialisation of a workflow. (The form isn't used to start the workflow - I'm doing it the other way around since I want the other aspects available to me within the workflow.)After hacking around a bit, it seems one needs to add the following structure (as seen from the LAPI connection logs) to the WorkPackage Record for the form:\'Data\'= A<1,?,\'DataAssoc\'= A<1,?,\'Values\'= {A<1,?, 2=A<1,?,\'ID\'=2,\'Values\'={?}>, 3=A<1,?,\'ID\'=3,\'Values\'={?}>, 7=A<1,?,\'ID\'=7,\'Values\'={?}>, 8=A<1,?,\'ID\'=8,\'Values\'={?}>, 9=A<1,?,\'ID\'=9,\'Values\'={?}>, 10=A<1,?,\'ID\'=10,\'Values\'={\'sometext\'}>, 11=A<1,?,\'ID\'=11,\'Values\'={?}>, 12=A<1,?,\'ID\'=12,\'Values\'={?}> >} >, \'LL_TemplateVersion\'=2 >,The way I understand these text representations are that each key/value pair in the above Assoc within the List called Values are set are that they are index numbers. The above example is seen when the workflow is initialised through the web interface.If however I do this with the LAPI interface, each key in the Assoc inside the Values List is a string (i.e. '10'=<A,1,?,\'ID'...) using the add("10",LLValue) syntax.This is also the way it gets into the database into the WForms and WFormVersions tables.I can confirm that it definitely is this because I can get it to work by deleting the extraneous ' symbols around each key in the database directly.Maybe there is a different way to do this altogether ? Should I be using RecArray's and/or Records in stead ?Please help.Kind Regards,Rolf.+27-83-680-4250 / rolf.poser@za.didata.com