AnsweredAssumed Answered

Validate Query?

Question asked by johnmdye on Jan 9, 2014
Latest reply on Jan 9, 2014 by jamesfreddyc
Has anyone ever noticed that the layer.definitionQuery property will just blindly assign anything you give to it, even if its an invalid query?

This is an invalid query. The FIELDNAME should be in quotes.
lyr.definitionQuery = "FIELDNAME = 'VALUE'"

This is a valid query:
lyr.definitionQuery = "'FIELDNAME' = 'VALUE'"

Does anyone know of a method to validate the query before blindly applying what could be an invalid query?