Edit an attribut inside an IData complex Document


I have a flow Java service that parses a Document (it’s a document thats contains IData, IData[] and String data).

After having cloning my Document, I would like to know if there is any way to edit and update a String attribut ?
(without using IDataUtil.remove() and then IDataUtil.put() ).

I would hope such a method exist, but no :
IDataUtil.updateString(idcPolice, “noContrat”, “1212”);

If I have to edit a little information, am I obliged to recreate all the nested IData structure of that document ?


Why don’t you use IDataUtil.put()? According to the docs, it should do exactly what you need. No need to call remove prior to put.

Yes, great. you’re right… I did’nt know that for an existant key the value was replaced. :slight_smile:
Thanks a lot.