Hi, I need this: result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ): result.append( item ) return result to be: result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ): (and if there is something entered in the 'publish' field) result.append( item ) return result Thanks in advance. Tom Scheidt | www.falsemirror.com | tom@falsemirror.com ---------------------------------------------------------------------------- -----------
----- Original Message ----- From: Tom Scheidt <tom@falsemirror.com>
result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ): (and if there is something entered in the 'publish' field) result.append( item ) return result
If you just meant, is the value of the 'publish' property is "true" (nonblank string, nonzero int, etc.) then you want: result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ) and item.publish: result.append( item ) return result Cheers, Evan @ digicool & 4-am
participants (2)
-
Evan Simpson -
Tom Scheidt