cancel
Showing results for 
Search instead for 
Did you mean: 

Modify a multi Tuple valued filed value

Former Member
0 Kudos

Hi,

I am not able to modifya field value and getting a error as Field not found. and not able to update

below is the code im using

TupleValue mValPlant = null;

MultiTupleValue mtvAddress = null ;

MdmValue mvPlants = new StringValue("CL02");

mtvAddress = mtvAddress1;

mValPlant = (TupleValue) mtvAddress.getValue(0);

mValPlant.setFieldValue(tfiPlant, new StringValue("R6"));

mtvAddress.modifyTupleValue( mValPlant ) ;

try {

try {

rrCord_plnt.setFieldValue(tb2, mtvAddress);

} catch (MdmValueTypeException e) {

e.printStackTrace();

}

}catch (IllegalArgumentException e1) {

e1.printStackTrace();

}

ModifyRecordCommand modifyRecordCommand = new ModifyRecordCommand(connection);

modifyRecordCommand.setSession(sesId);

modifyRecordCommand.setRecord(rrCord_plnt);

modifyRecordCommand.setModifyAnyway(true); //this accepts the boolean parameter and the value is case sensitive

try {

modifyRecordCommand.execute();

} catch (CommandException e) {

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Hi,

I cannot determine from your code, but I suspect the exception is thrown at either of the following lines:

mValPlant.setFieldValue(tfiPlant, new StringValue("R6"));
...
rrCord_plnt.setFieldValue(tb2, mtvAddress);

and I suspect either the FieldId object tfiPlant or tb2 is unknown. Have you checked whether either of those objects are valid?

Cheers,

Robin

Former Member
0 Kudos

Hi Robin,

Yes i was getting the error when passing the new string value "R6", and now i tries it passing the direct record value and it is getting updated

Thank you for ur reply as it showed me where the error was.

Dumpala

Answers (0)