The loop works for the first value.
At each subsequent value which needs to be updated, an “Out of Bounds” exception is thrown.
[image]
A Try Catch enables the loop to continue.
The Extraction Result does get updated, or shows as updated in Debug, but when passing the item to “Create an Item for Action Center”, the Activity fails.
Instead of using indexes, loop using For Each over the fields in the current row and update them by name, or first check the Count before assigning. Another option is to update a local copy of the row object and then assign it back to the collection after the loop. That way, you avoid the index mismatch and the exception won’t be thrown.
As I said in my post I am already using a “For Each” loop.
Every entry is being looped through correctly, as I can put the values out in Log Messages.
It is just the update which is throwing the exception.
currentTableOfVehicleCodes.VehicleCodeStartDate.Value - is the same in both cases.
It works OK for the first entry in the loop.
The structure in Debug shows the correct updated value for subsequent entries but throws the exception.
Hopefully somebody else has updated similar structures created by IXP Generative so that they can be presented in Action Center. If anybody has some similar code that works that they could share here, that would be great.
Your example is not using IXP Generative Extraction.
In IXP Generative Extraction there is no Taxonomy, no Digitise document, no extraction scope.
The Results Table is different.
I have tried but “.values(0)” does not work. A message that it is not “Multi-valued”.
Yes, I can explicitly reference each occurrence to read it, but it is the assign of a value which is giving the “index out of bounds” error. The same is true when executing a For Each loop.
The above sample uses IXP Generative Extraction.
To around the problem, what it’s doing is mapping the IXP Generative Extraction to the Extraction Table. Then we can edit it and create validation task.
I have tried but “.values(0)” does not work. A message that it is not “Multi-valued”.
This part may vary depending on the taxonomy definition in IXP, so please adjust it appropriately.
Perhaps I am confused, but the IXP Generative Extraction for Unstructured Documents uses a different approach no taxonomy, no digitise document, etc, so I do not believe it is same as using a “Generative Extraction” in the Document Understanding framework.
The code in Studio is different.
The Update issue may not exist when using the Document Understanding framework.
Result from IXP Genrative extraction also has taxonomy, DOM etc, internally.
For example
exRes.Properties.Taxonomy returns taxonomy instance. exres.DocumentMetadata.DocumentObjectModel returns DOM instance.
They are compatible with each class used in DU.
note: exRes is IDocumentData<GptIxp68> type (in my environment)
So, we can also use IXP from older style DU workflow. In addition, we can also use multiple extractors in Data Extraction Scope activity, for example invoice DocPath ML extractor + IXP Generative extractor.
(However it’s a little bit complicated)