Re: [Zope] simple dtml-if question
On Wed, Jul 26, 2000 at 10:14:09AM -0700, joel grimes wrote: > How do I do this? > > I have a table with a field called SerialNumber. I want to test it for null > and return a non-breaking space if it's null. > > Here's what I tried: > > > > > If null means an empty string (e.g. '') or the Python value None, the first line should be: nbsp; or perhaps (empty string only) nbsp; It really helps to remember that anything inside double quotes gets evaluated as a Python expression. You were initially trying to assign the value of null (which may have not actually existed) to SerialNumber. -- Patrick Lewis <[EMAIL PROTECTED]> ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] simple dtml-if question
>If the SerialNumber is taken from a ZSQL method, shouldn't you been able to >show it without testing its content. >Such as: > > >Those rows that have something other than 'null' would be shown together >with a . Well, THAT never occurred to me. Somethimes the easiest solution is the best. Thanks, Joel Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] simple dtml-if question
Marcel Preda wrote: > just: > > > Actually: The logic got turned upside dowm . -- Tim Cook -- FreePM Project Coordinator - http://www.freepm.org OS Healthcare Alliance Supporter - http://www.oshca.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] SV: [Zope] simple dtml-if question
Correct me if I'm wrong. If the SerialNumber is taken from a ZSQL method, shouldn't you been able to show it without testing its content. Such as: Those rows that have something other than 'null' would be shown together with a . Curious. - Original Message - From: joel grimes <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 26, 2000 6:14 PM Subject: [Zope] simple dtml-if question > How do I do this? > > I have a table with a field called SerialNumber. I want to test it for null > and return a non-breaking space if it's null. > > Here's what I tried: > > > > > > Doesn't work (be nice-I'm new). I've tried various combinations of quotes - > no quotes but apparently haven't hit it just right yet. > > What I'm trying to do is stick SOMETHING in an empty cell so netscape > doesn't remove my borders when it encounters the empty cell - is there an > easy fix? > > Thanks, > > Joel > > > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] simple dtml-if question
joel grimes wrote: > > How do I do this? > > I have a table with a field called SerialNumber. I want to test it for null > and return a non-breaking space if it's null. > > Here's what I tried: > > > > -- Nick Garcia | [EMAIL PROTECTED] CodeIt Computing | http://codeit.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] R: [Zope] simple dtml-if question
___ "Will I be using Python today?" and if the answer is "yes" I know that it's going to be a good day. - Original Message - From: joel grimes <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 26, 2000 7:14 PM Subject: [Zope] simple dtml-if question > How do I do this? > > I have a table with a field called SerialNumber. I want to test it for null > and return a non-breaking space if it's null. > > Here's what I tried: > > > > > > Doesn't work (be nice-I'm new). I've tried various combinations of quotes - > no quotes but apparently haven't hit it just right yet. just: PM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] simple dtml-if question
How do I do this? I have a table with a field called SerialNumber. I want to test it for null and return a non-breaking space if it's null. Here's what I tried: Doesn't work (be nice-I'm new). I've tried various combinations of quotes - no quotes but apparently haven't hit it just right yet. What I'm trying to do is stick SOMETHING in an empty cell so netscape doesn't remove my borders when it encounters the empty cell - is there an easy fix? Thanks, Joel Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )