code: function final(err,response){
    			if(err){$scope.errmsg = "Server error, please try again.";console.log({error:err})}
    			if(response){
  				//console.log(response);
  				$scope.csql.inuse = true;
  				$scope.runtestmsg = "Validated - OK";
  				$rootScope.mdb.queries.forEach(function(item){
    					if (item.id == $scope.csql.id){
    						item.inuse = true;
    					};
    				});
    				delete $rootScope.mdb.esqls[$scope.savecsql.queryname]
    				var newrec = angular.copy($scope.csql)
    				$rootScope.mdb.sqls[$scope.csql.queryname] = newrec;
    			}
    		}
docs: console.log("VALIDATE SQL"); B3CS0Q9RJGPCWS