Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
72:custom_reports_accessing_data_reading_oldercontent [2019/02/27 18:28] – created ext-bkkr | 72:custom_reports_accessing_data_reading_oldercontent [2019/10/04 07:04] – cgl | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Accessing Older File Version Content ====== | ====== Accessing Older File Version Content ====== | ||
+ | |||
+ | 1. Use the report example from the [[: | ||
+ | |||
+ | 2. Create a new version of the Artifact Instance (File) in Stages by uploading a changed MS Excel file. | ||
+ | |||
+ | 3. Update the Data Set with 2 additional result columns: | ||
+ | |||
+ | ^Name^Type| | ||
+ | |A|Integer| | ||
+ | |B|Date| | ||
+ | |C|String| | ||
+ | |**Revision** |**String** | | ||
+ | |**RevisionDate** |**Date** | | ||
+ | |||
+ | 4. Click on** Preview Results** in the Data Set. | ||
+ | |||
+ | **Example MS Excel Extraction Script with Version Support** | ||
+ | < | ||
+ | function dumpValues(revision, | ||
+ | if (file !=null) { | ||
+ | var wb = new WorkbookFactory.create(file); | ||
+ | // var sheet = wb.getSheetAt(0); | ||
+ | var sheet = wb.getSheet(" | ||
+ | for (myrow = 1; !isCellEmpty(sheet, | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | var ArtifactName = "Excel Metric Example"; | ||
+ | var ArtifactInstanceName = " | ||
+ | var process = stages.getCurrentProcess(); | ||
+ | var artifacts = process.getEntities(" | ||
+ | for each (artifact in artifacts) { | ||
+ | if (artifact.getProperty(" | ||
+ | var artifacts_instances = | ||
+ | | ||
+ | for each (artifacts_instance in artifacts_instances) { | ||
+ | if (artifacts_instance.getProperty(" | ||
+ | | ||
+ | var artifact_revisions = | ||
+ | | ||
+ | for each (artifact_revision in artifact_revisions) { | ||
+ | var filestream = artifact_revision.getProperty(" | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | \\ | ||