public function getDefaultValue()
    {
        if ($this->defaultValue == "" && $this->keepCookie!='Y')
            return "";
        $formObj = $this->getFormObj();
        if($this->keepCookie=='Y'){
        	$cookieName = $formObj->objectName."-".$this->objectName;      
        	$cookieName = str_replace(".","_",$cookieName);
        	$defValue = $_COOKIE[$cookieName];         	       
        }                
        if(!$defValue){
        	$defValue = Expression::evaluateExpression($this->defaultValue, $formObj);
        }
        //add automatic append like new record (2)
        if($this->defaultValueRename!='N'){
	        if(!is_numeric($defValue)){
		        $dataobj = $formObj->getDataObj();
		        if($this->fieldName && $dataobj){
		        	if(substr($this->fieldName,0,1)!='_'){        	
			        	$recs = $dataobj->directfetch("[".$this->fieldName."] = '$defValue' OR "."[".$this->fieldName."] LIKE '$defValue (%)'" );	        	
			        	if($recs->count()>0){
			        		$defValue.= " ( ".$recs->count()." )";
			        	}
		        	}
		        }
	        }
        }
        return $defValue;
    }