vivo 638 fixing query for existing interval value to utilize variable for object so editing works correctly