[Zope] RE: DTML-IF problem

Derek S. Wilson dwilson at abrazohealth.com
Tue Oct 7 11:50:14 EDT 2003


Well, Here's what I do when my database doesn't return anything...
 
<dtml-in getProjects>
<tr>
 <td><input type="radio" name="ID" value="<dtml-var id>"><dtml-var id></td>
 <td><dtml-var startdate></td>
 <td><dtml-var enddate></td>
 <td><dtml-var location></td>
 <td><dtml-var assignedto></td>
 <td><dtml-var name></td>
 <td><center><dtml-var percentcompleted>%</center></td>
</tr>
<dtml-else>
<h1>No projects found.</h1><br><br><br>
</dtml-in>

	-----Original Message----- 
	From: K. Praveen Kumar [mailto:praveen at softprosys.com] 
	Sent: Tue 10/7/2003 3:43 AM 
	To: zope at zope.org; Praveen Kumar 
	Cc: Derek S. Wilson; dieter at handshake.de; allison at sumeru.stanford.EDU; lukesh at seznam.cz; cms at adytumsolutions.com 
	Subject: DTML-IF problem
	
	

	Dear All,
	    I am getting problem while evaluating the condition. I am retrieving
	the values from MySQL database to show in the text boxes. Here I would
	like to test whether the data in the database is empty or not. If empty
	then I would like to show one message, if not I wanted to get the value.
	
	This is the code:
	*****************************************************************
	
	<input type="text" name="date3:date" size="15" value="<dtml-if
	"Child_Enrollment_Date=='NULL'"><dtml-var Child_Enrollment_Date
	null=""><dtml-else><dtml-call
	"REQUEST.set('Child_Enrollment_Date1',Child_Enrollment_Date.strftime('%m/%d/%Y'))"><dtml-var Child_Enrollment_Date1 null=""></dtml-if>">
	
	*****************************************************************
	It is every time executing the <dtml-else> part. How can I validate the
	'Null'? Please give your suggestions on this
	
	
	--
	Thanks & Regards
	Praveen Kumar
	SoftPro Systems Ltd
	
	



More information about the Zope mailing list