1

Re: Updateing additional attributes

Hi,

if I want to update an entry in the warehouse, I load it, maniuplate it and then send it back to the warehouse. Because I sent the Id with it, it gets updated. So long so good.
But when I send a additional attribute with it, after updateing the entry, the attitional attribute is not updated. There is a second addtional attriubte with the entry, even if the attriubte is not allow to have multible values.

How to handle this? The additional attribute tabels are not available by the webservice.

Regards

Daniel

2

Re: Updateing additional attributes

Hi Daniel
When you save an attribute value, you must also send the attribute value's ID with it. To do this using the submission structure, you just append a colon then the attribute value ID to the fieldname given. For example, if we have a custom attribute with ID=10 and we want to submit a new sample, then we might submit the following:

date_start=04/02/2012
date_end=04/02/2012
date_type=D
entered_sref=SY098765
entered_sref_system=OSGB
smpAttr:10=My attribute value

Then, if you were to edit this you might end up with sample ID 50 and the attribute value record created with ID 100. In which case, to edit this you would submit:

id=50
date_start=04/02/2012
date_end=04/02/2012
date_type=D
entered_sref=SY098765
entered_sref_system=OSGB
smpAttr:10:100=My edited attribute value

Hopefully that makes sense. Let me know if not.

John van Breda
Biodiverse IT