Unable to select fields when creating a condition