Using SystemWeaver Script Language, it is possible to get the previous version(s) of an item, as shown below in the grid definition.
The grid definition uses:
Grid Definition:
<Grid> <Columns> <ItemNameColumn width="200" /> <ItemVersionColumn/> </Columns> <!--First call for the "PreviousVersions" template, with two initial values for the parameters --> <ApplyTemplate name="PreviousVersions"> <WithParam name="p1" select="."/> <WithParam name="p2" select="[]"/> </ApplyTemplate> <!--Get Previous Versions, if there is any--> <Template name="PreviousVersions"> <Parameter name="p1" as="Item"/> <Parameter name="p2" as="[Item]"/> <Row> <!--Get Previous Version, if there is one--> <ForEach select="PrevVersion[Handle != '' ]"> <Variable name="CurrentItem" as="Items" select="."/> <Variable name="Accumulated" as="Items" select="$p1 union $p2"/> <!--Recursive calling for the template, with updated values for the parameters --> <ApplyTemplate name="PreviousVersions"> <WithParam name="p1" select="."/> <WithParam name="p2" select="$Accumulated"/> </ApplyTemplate> </ForEach> </Row> </Template> </Grid>
Result:
Thanks,
Bashar
Bashar Nassar
Using SystemWeaver Script Language, it is possible to get the previous version(s) of an item, as shown below in the grid definition.
The grid definition uses:
Grid Definition:
Result:
Thanks,
Bashar