Re: IF/THEN, SHOWIF, and/or HIDEIF

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68938
interpreted = N
texte = This should do the trick for you :) [IF (("[URL][setiuser][/URL]"!"")&("[setiuser]"!"[Raw][setiuser][/ Raw]"))&(("[URL][password][/URL]"!"")&("[password]"!"[Raw][password][/ Raw]"))&(("[URL][setifunction][/URL]"!"")&("[setifunction]"!"[Raw] [setifunction][/Raw]"))&(("[URL][code][/URL]"!"")&("[code]"!"[Raw] [code][/Raw]"))] [Then] [If (("[URL][batchsize][/URL]"!"")&("[batchsize]"!"[Raw][batchsize][/ Raw]"))&(("[URL][startnum][/URL]"!"")&("[startnum]"!"[Raw][startnum][/ Raw]"))] [Then]******* Batchsize & Startnum have been passed *******[/Then] [Else] [If ("[URL][batchsize][/URL]"!"")&("[batchsize]"!"[Raw][batchsize][/ Raw]")] [Then]****** Batchsize passed ******[/Then] [Else]****** Batchsize FAIL ******[/Else] [/If] [If ("[URL][startnum][/URL]"!"")&("[startnum]"!"[Raw][startnum][/Raw]")] [Then]****** Startnum passed ******[/Then] [Else]****** Startnum FAIL ******[/Else] [/If] [/Else] [/If] [/Then] [Else]****** All FAIL ******[/Else] [/If] On 04 May 2007, at 1:29 AM, Ki Song wrote: > An external program is going to generate a URL that has the following > variables: > Setifunction > Setiuser > Password > Code > > The following variables may or may not be present: > Startnum > Batchsize > > > I have this piece of code that will check for the required variables: > [IF (("[setiuser]"="username") & ("[password]"="password") & > ("[setifunction]"="somefunction") & ("[code]"="somecode"))] > > > How can I modify the above code to require startnum, batchsize, or > startnum > AND batchsize IF these variables are passed through the url? > > Here are three examples of valid urls: > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode&batchsize=1000 > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode&batchsize=1000&startnum=1 > > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: IF/THEN, SHOWIF, and/or HIDEIF ( Stuart Tremain 2007)
  2. IF/THEN, SHOWIF, and/or HIDEIF ( Ki Song 2007)
This should do the trick for you :) [IF (("[url][setiuser][/URL]"!"")&("[setiuser]"!"[raw][setiuser][/ Raw]"))&(("[url][password][/URL]"!"")&("[password]"!"[raw][password][/ Raw]"))&(("[url][setifunction][/URL]"!"")&("[setifunction]"!"[raw] [setifunction][/Raw]"))&(("[url][code][/URL]"!"")&("[code]"!"[raw] [code][/Raw]"))] [Then] [If (("[url][batchsize][/URL]"!"")&("[batchsize]"!"[raw][batchsize][/ Raw]"))&(("[url][startnum][/URL]"!"")&("[startnum]"!"[raw][startnum][/ Raw]"))] [Then]******* Batchsize & Startnum have been passed *******[/Then] [Else] [If ("[url][batchsize][/URL]"!"")&("[batchsize]"!"[raw][batchsize][/ Raw]")] [Then]****** Batchsize passed ******[/Then] [Else]****** Batchsize FAIL ******[/Else] [/If] [If ("[url][startnum][/URL]"!"")&("[startnum]"!"[raw][startnum][/Raw]")] [Then]****** Startnum passed ******[/Then] [Else]****** Startnum FAIL ******[/Else] [/If] [/Else] [/If] [/Then] [Else]****** All FAIL ******[/Else] [/If] On 04 May 2007, at 1:29 AM, Ki Song wrote: > An external program is going to generate a URL that has the following > variables: > Setifunction > Setiuser > Password > Code > > The following variables may or may not be present: > Startnum > Batchsize > > > I have this piece of code that will check for the required variables: > [IF (("[setiuser]"="username") & ("[password]"="password") & > ("[setifunction]"="somefunction") & ("[code]"="somecode"))] > > > How can I modify the above code to require startnum, batchsize, or > startnum > AND batchsize IF these variables are passed through the url? > > Here are three examples of valid urls: > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode&batchsize=1000 > > https://www.mystore.com/script.ext? > setifunction=downloadprods&setiuser=usern > ame&password=password&code=somecode&batchsize=1000&startnum=1 > > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Stuart Tremain

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:

method of payment (1997) Re:URGENT: WebCatalog 2.0 (1998) The USArea® Network web site ... (1997) [Sum] function? (1997) A Suggestion? (1998) Searching multiple Databases (1997) text size limitation (1997) help on brickwalls (2003) Moment of Thanks (1997) Showif, Hideif reverse logic ? (1997) Logical and or in [hideif] (1997) WebCat2 beta 11 - new prefs ... (1997) Email password -- was Classified Ads 4 Sale (1998) Card clearance, problems - solutions? (1997) shipping costs (1997) and passing to a cart (1997) change the number format (1997) carriage returns in data (1997) WebCat2 Append problem (B14Macacgi) (1997) WebCatalog for guestbook ? (1997)