Create definecriterion functionality