How to edit the ExtractionResult (extracted from Data Extraction Scope) and post editing, need to convert back to ExtractionResult Variable type

It is easy to change existing value, but creating new one is much more complicated.
This is how this ResultValue object looks like:

As you see it is not only the value itself, but also a lot of different data like confidences and references to the document (region, size etc).

If you want to create value for single field, use SetValue method to the field object:

objExtractionResults.ResultsDocument.Fields.FirstOrDefault(function(x) x.FieldId.Equals("NoGroup.NoCategory.REMI.correctamount")).SetValue(new ResultsValue("Yes",nothing,1,1))

As an argument of SetValue method use the new ResultsValue object (there are a lot of constructors, use the simplest one). In my example (binary field) I use “yes” as value, nothing as ResultContentReference, and 1 for confidence levels

1 Like