How to view all invoice properties without opening Validation Station

I cannot find any examples of accessing the ExtractionResults object to get all invoice property values. How can I access the final invoice values after the Validation code?

According to the documentation it looks like there may be a few ways to get the invoice properties. I see that the ExtractionResult can be turned into a dataSet then multiple dataTables, but I can’t seem to get the syntax to work when trying to log values. I also tried to use GetTableFieldValue(“invoice-no”), but it seems to be empty. Is there some way to view the actual objects in variables while debugging, like hovering over variables in visual studio, or could someone show me an example of accessing the ExtractionResults invoice properties?

If you serialize ValidatedExtractionResults (ValidatedExtractionResults.Serialize) - it will return a string of serialized JSON that you can Deserialize into JObject and then work with it as you would with any other JSON file.

This string is helpful to save to a file first, so you can see the structure of the data, so you can find your way to navigate through it.

To access the data within your script, you just need to drop Deserialize JSON activity after Validation Station activity and use the following arguments:

  • Input JsonString would be your serialized results - ValidatedExtractionResults.Serialize
  • Output JsonObject would be a new variable of type JObject say we call it json

And then you can access your data like this:

  • To get ID of the first field that you defined in Extractors:
  • To get the value of the same field: