Is it possible to have an "if contain" condition?

On Restrict Command trait, is it possible to formulate the condition to work on something like “ZoneX contain PieceY with MarkerZ”?