convert condition tag to query string