1

I would like to select the LATEST version of all elements in a directory based on the creation date otherwise select version 0. Does any one know if this can be achieved using the available config_spec syntax?

eg:

if (created_on >= 01-jan-2014)
 element * /main/LATEST
else
 element * /main/0
Venky
  • 559
  • 7
  • 25
Sam
  • 190
  • 2
  • 6

2 Answers2

1

You can try a time directive of selection rule.

element /myPath/... /main/{created_since(01-Jan-2014)}
element /myPath/... /main/LATEST

That could enable you to see versions based on their creation date (see time and query)

See also "time-based rule" answer.

The second rule selection LATEST, not 0, as a way to test the first rule: remember that if a parent folder was not selected by the first rule, none of its sub-elements would be considered if it was in version 0.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

Thanks for the hint VonC, I have achieved exactly what I need based on the following rules.

element -dir /myPath/... /main/LATEST
element /myPath/... /main/{created_since(01-Jan-2014)}
element /myPath/... /main/0
Sam
  • 190
  • 2
  • 6