Re: Newbie Question about a Logical AND in a show if statement....

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24618
interpreted = N
texte = Try this code:[text show=f]babyState=[/text] [showif [math]{[date_one]}-{[date_two]}<[math]365[/math][text show=f]babyState=Infant. . .[/text][/showif] [showif [math]{[date_one]}-{[date_two]}<[math]30[/math][text show=f]babyState=Neonatal. . .[/text][/showif] [text show=t]babyState[/text]This is kind of annoying, but really its not much extra code.If the difference is greater than 365 nothing will be displayed if the difference is less than 365 but not less than 30 (greater than 30) Infant . . . is displayed if the difference is less than 30 it is also less than 365 Neonatal is displayed. The text which was written for less than 365 is over written by the text for the case when difference is less than 30.----- Original Message ----- From: Eric Ridgley To: WebCatalog Talk Sent: Thursday, November 18, 1999 4:48 PM Subject: Newbie Question about a Logical AND in a show if statement.... > > I want to 'calculate' the value of an AGE category text field when the > user inputs 2 different dates in a form. > > I have: > [showif {[date_one]}-{[date_two]}<30]Neotal less than 30 days old[/showif] > [showif {[date_one]}-{[date_two]}<365]Infant less than one year[/showif] > > but both are true if it is less than 30, how do I incorporate a Logical and? > > (please note this is 'mock code' below is only to illustrate what I > would like to do) > > [showif ({[date_one]}-{[date_two]}<365) and ({[date_one]}-{[date_two]}>29)] > Infant less than one year > [/showif] > > How would I do this in WebCat? > > HELP! I've done a little C++ and JavaScript and Scripting in FMP(which > is a cinch!) but this has me stumped!!! > > > -- > Eric Ridgley, Web/Graphic Designer...............Phone: 330.630.4487 > Silver Creek, Ltd. ...............Fax: 330.630.5786 > 143 Northwest Avenue, Suite B101 ...............URL: www.silvercreek.net/ > Tallmadge Ohio 44278 ...............URL: www.ridgley.org/ > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Newbie Question about a Logical AND in a show if statement.... (Josh Tiger 1999)
  2. Newbie Question about a Logical AND in a show if statement.... (Eric Ridgley 1999)
Try this code:[text show=f]babyState=[/text] [showif [math]{[date_one]}-{[date_two]}<[math]365[/math][text show=f]babyState=Infant. . .[/text][/showif] [showif [math]{[date_one]}-{[date_two]}<[math]30[/math][text show=f]babyState=Neonatal. . .[/text][/showif] [text show=t]babyState[/text]This is kind of annoying, but really its not much extra code.If the difference is greater than 365 nothing will be displayed if the difference is less than 365 but not less than 30 (greater than 30) Infant . . . is displayed if the difference is less than 30 it is also less than 365 Neonatal is displayed. The text which was written for less than 365 is over written by the text for the case when difference is less than 30.----- Original Message ----- From: Eric Ridgley To: WebCatalog Talk Sent: Thursday, November 18, 1999 4:48 PM Subject: Newbie Question about a Logical AND in a show if statement.... > > I want to 'calculate' the value of an AGE category text field when the > user inputs 2 different dates in a form. > > I have: > [showif {[date_one]}-{[date_two]}<30]Neotal less than 30 days old[/showif] > [showif {[date_one]}-{[date_two]}<365]Infant less than one year[/showif] > > but both are true if it is less than 30, how do I incorporate a Logical and? > > (please note this is 'mock code' below is only to illustrate what I > would like to do) > > [showif ({[date_one]}-{[date_two]}<365) and ({[date_one]}-{[date_two]}>29)] > Infant less than one year > [/showif] > > How would I do this in WebCat? > > HELP! I've done a little C++ and JavaScript and Scripting in FMP(which > is a cinch!) but this has me stumped!!! > > > -- > Eric Ridgley, Web/Graphic Designer...............Phone: 330.630.4487 > Silver Creek, Ltd. ...............Fax: 330.630.5786 > 143 Northwest Avenue, Suite B101 ...............URL: www.silvercreek.net/ > Tallmadge Ohio 44278 ...............URL: www.ridgley.org/ > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Josh Tiger

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat2b12 - New features for 1.6 users ... (1997) Document Contains No Data! (1997) WebDNA Developer Resource Center (2002) WebCatalog 4.0 has been released! (2000) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) Search returns all, not 20 (1997) Banners (1997) WebCat for Unix?? (1997) autosensing lanague selection (1997) Locking up with WebCatalog... (1997) Upcoming 2.1 Release and PCS Committment (1997) Introduction/Tutorial/QuickStart (1997) Help name our technology! I found it (1997) Search inside Include (1998) WebCatalog 4.x Consultant Needed (2003) Exclude by date - multiple (1997) Re:WebDNA Writer Needed (1997) duplicate cart numbers - New P3P Rule (2002) Adding To items to cart at once (1999) [WebDNA] Brian Harrington (2019)