What is WebDNA

WebDNA is a scripting and database system designed to easily build web applications.

WebDNA and BioType

BioType service is a biometric keystroke dynamic system. It will be part of WebDNA 8.5

Download WebDNA

Download WebDNA freeware, try it and register later if you want.

WebDNA resources

The list of all WebDNA instructions.
WebDNA
Software Corporation
Search WebDNA Site
 Menu


HOME


DOWNLOADS


LEARN


EDUCATION


NEWS


COMMUNITY


STORE


SUPPORT


CONTACT

Re: [WebDNA] [if] or [case] or something else

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 110025
interpreted = N
texte = Wasn't it 120 below 650? For setting the result to min 50 use: [showif [x]<50][math show=3Df]x=3D50[/math][/showif] Best, Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se 13 dec 2012 kl. 18.30 skrev Steve Craig: > Hi >=20 > I have a lower level of 500 and an upper of 1550, anything 500 or less = should make x =3D 120, anything 1550 or more should make x =3D 50 >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 >=20 > On 13 Dec 2012, at 17:24, Christer Olsson = wrote: >=20 >> If I understand your formula correctly you could just use something = like: >>=20 >> [math show=3Df]x=3D120-(floor(([thisPrice]-500)/150)*10)[/math] >>=20 >> And if you're not accepting x to be lower than 0 then add: >>=20 >> [showif [x]<0][math show=3Df]x=3D0[/math][/showif] >>=20 >> Best, >> Christer >>=20 >> ************************************************************* >> Christer Olsson PO Box 9160 Phone +46 40 25 85 85 >> Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 >> Kantyxegatan 5 Sweden http://www.ljusaideer.se >>=20 >> 13 dec 2012 kl. 18.00 skrev Steve Craig: >>=20 >>> Hi >>>=20 >>> Ok thanks for this, I take it there is not a [elseif] statement in = WebDNA so it's all nested in one if? >>>=20 >>> Cheers >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> Steve Craig - Asylum Interactive Ltd >>> Tel +44 1330 860550 Fax +44 1330 860880 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> http://www.asylumweb.com >>> Email: steve@asylumweb.com >>> Skype: s.craig - iChat: steve.craig >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>=20 >>>=20 >>>=20 >>>=20 >>> On 13 Dec 2012, at 16:49, Brian Fries wrote: >>>=20 >>>> Switch only works for "equals" comparisons, not less than or = greater than, so if/then/else is your best choice here. >>>>=20 >>>> [text]x=3D[if [price]<650][then]120[/then][else][if = [price]<800][then]110[/then][else]100[/else][/if][/else][/if][/text] >>>>=20 >>>> You can extend this as far as you like; just be sure to close all = the if, then and else contexts properly. >>>>=20 >>>> Brian >>>>=20 >>>> On Dec 13, 2012, at 8:13 AM, Steve Craig = wrote: >>>>=20 >>>>> Hi All >>>>>=20 >>>>> I have a little problem that I'm hoping someone cane help with or = at least point me in the correct direction. >>>>>=20 >>>>> I have a list of prices, if the price lies in a particular range I = do one set of maths, if it lies in a different range I do a different = thing etc etc.=20 >>>>>=20 >>>>> <650 then set x to 120 >>>>> =3D>650 and < 800 set x to 110 >>>>> =3D>800 and < 950 set x to 100 >>>>> .... >>>>> .... >>>>> .... >>>>>> 1550 set x to 50 >>>>>=20 >>>>> What is the best way to code it, using if then or using switch? If = it's switch then what is the syntax of the case bit? Or maybe a = different way? >>>>>=20 >>>>> Any help much appreciated. >>>>>=20 >>>>> Cheers >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> Steve Craig - Asylum Interactive Ltd >>>>> Tel +44 1330 860550 Fax +44 1330 860880 >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> http://www.asylumweb.com >>>>> Email: steve@asylumweb.com >>>>> Skype: s.craig - iChat: steve.craig >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>> --------------------------------------------------------- >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list . >>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>> Bug Reporting: support@webdna.us >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [BULK] Re: [WebDNA] [if] or [case] or something else ("Brian B. Burton" 2012)
  2. RE: [BULK] Re: [WebDNA] [if] or [case] or something else ("Terry Nair" 2012)
  3. Re: [BULK] Re: [WebDNA] [if] or [case] or something else ("Brian B. Burton" 2012)
  4. RE: [BULK] Re: [WebDNA] [if] or [case] or something else ("Terry Nair" 2012)
  5. Re: [BULK] Re: [WebDNA] [if] or [case] or something else (Steve Craig 2012)
  6. [BULK] Re: [WebDNA] [if] or [case] or something else ("Brian B. Burton" 2012)
  7. Re: [WebDNA] [if] or [case] or something else (Christer Olsson 2012)
  8. Re: [WebDNA] [if] or [case] or something else (Steve Craig 2012)
  9. Re: [WebDNA] [if] or [case] or something else (Christer Olsson 2012)
  10. Re: [WebDNA] [if] or [case] or something else (Steve Craig 2012)
  11. Re: [WebDNA] [if] or [case] or something else (Brian Fries 2012)
  12. [WebDNA] [if] or [case] or something else (Steve Craig 2012)
Wasn't it 120 below 650? For setting the result to min 50 use: [showif [x]<50][math show=3Df]x=3D50[/math][/showif] Best, Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se 13 dec 2012 kl. 18.30 skrev Steve Craig: > Hi >=20 > I have a lower level of 500 and an upper of 1550, anything 500 or less = should make x =3D 120, anything 1550 or more should make x =3D 50 >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 >=20 > On 13 Dec 2012, at 17:24, Christer Olsson = wrote: >=20 >> If I understand your formula correctly you could just use something = like: >>=20 >> [math show=3Df]x=3D120-(floor(([thisPrice]-500)/150)*10)[/math] >>=20 >> And if you're not accepting x to be lower than 0 then add: >>=20 >> [showif [x]<0][math show=3Df]x=3D0[/math][/showif] >>=20 >> Best, >> Christer >>=20 >> ************************************************************* >> Christer Olsson PO Box 9160 Phone +46 40 25 85 85 >> Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 >> Kantyxegatan 5 Sweden http://www.ljusaideer.se >>=20 >> 13 dec 2012 kl. 18.00 skrev Steve Craig: >>=20 >>> Hi >>>=20 >>> Ok thanks for this, I take it there is not a [elseif] statement in = WebDNA so it's all nested in one if? >>>=20 >>> Cheers >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> Steve Craig - Asylum Interactive Ltd >>> Tel +44 1330 860550 Fax +44 1330 860880 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> http://www.asylumweb.com >>> Email: steve@asylumweb.com >>> Skype: s.craig - iChat: steve.craig >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>=20 >>>=20 >>>=20 >>>=20 >>> On 13 Dec 2012, at 16:49, Brian Fries wrote: >>>=20 >>>> Switch only works for "equals" comparisons, not less than or = greater than, so if/then/else is your best choice here. >>>>=20 >>>> [text]x=3D[if [price]<650][then]120[/then][else][if = [price]<800][then]110[/then][else]100[/else][/if][/else][/if][/text] >>>>=20 >>>> You can extend this as far as you like; just be sure to close all = the if, then and else contexts properly. >>>>=20 >>>> Brian >>>>=20 >>>> On Dec 13, 2012, at 8:13 AM, Steve Craig = wrote: >>>>=20 >>>>> Hi All >>>>>=20 >>>>> I have a little problem that I'm hoping someone cane help with or = at least point me in the correct direction. >>>>>=20 >>>>> I have a list of prices, if the price lies in a particular range I = do one set of maths, if it lies in a different range I do a different = thing etc etc.=20 >>>>>=20 >>>>> <650 then set x to 120 >>>>> =3D>650 and < 800 set x to 110 >>>>> =3D>800 and < 950 set x to 100 >>>>> .... >>>>> .... >>>>> .... >>>>>> 1550 set x to 50 >>>>>=20 >>>>> What is the best way to code it, using if then or using switch? If = it's switch then what is the syntax of the case bit? Or maybe a = different way? >>>>>=20 >>>>> Any help much appreciated. >>>>>=20 >>>>> Cheers >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> Steve Craig - Asylum Interactive Ltd >>>>> Tel +44 1330 860550 Fax +44 1330 860880 >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> http://www.asylumweb.com >>>>> Email: steve@asylumweb.com >>>>> Skype: s.craig - iChat: steve.craig >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>> --------------------------------------------------------- >>>>> This message is sent to you because you are subscribed to >>>>> the mailing list . >>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>> Bug Reporting: support@webdna.us >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Christer Olsson

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:

Questions. (1998) Using & in subject line (2003) Languages (1997) Re1000001: Setting up shop (1997) Webcat/Webmerchant part II (1998) Webcatalog acgi conflict? (1999) [WebDNA] CSS Advice (2008) Cancel Subscription (1996) Appending problem (still) on Solaris (2000) Configuring E-mail (1997) WebCat2_Mac RETURNs in .db (1997) # fields limited? (1997) Separate SSL Server (1997) WebCat2 - [format thousands] (1997) Extended [ConvertChars] (1997) Hello??? (1997) WebCatalog for Postcards ? (1997) Remote Administration (1998) Pulling Captions from JPGs (2003) Initiating NewCart (1997)