Re: ShowNext & Showif together
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25034
interpreted = N
texte = >>Hi there,>>>>I have a shownext context like this:>>>>[search>>group1field=Categoria+Subcategoria+Modelo+Marca+Nombre+DecripcionCorta+Desc>>ripcionLarga&db=mydatabase.db&wogroup1data=[busqueda]&Nombresort=1&Nombresd>>ir=as&max=10&startat=[startat]]>>>>[shownext position=begin&max=1&method=POST]
>href=resbusquedasolo.tmpl?startat=[start]&busqueda=[busqueda]> [start]>>- [end][/shownext]
[numFound] items found>>>>[shownext position=end&max=1&method=POST]
>href=resbusquedasolo.tmpl?startat=[start]&busqueda=[busqueda]> [start]>>- [end] [/shownext]>>>>[founditems]>> [showif [SePublica]=T] Some Fields [/showif]>>[/founditems]>>>>>> [/search]>>>>>>This count all the records found (2 for this example), inside the>>founditems I have a show if context to show the records if a flag is>>True, when I do a search it shows for example 2 items found but if one>>is flaged with False the results page shows one item but it shows 2>>items found also.>>It is confused for the user to see one record but the page said 2 items>>found.>>>>How can I fix this?>>>The easiest way is to use two founditems contexts in your search:>>The first must appear before any other code inside your search context, >and it will need to use a math routine that totals up all the items >displayed and sets the total to a text variable named [numDisplayed].>>Then you can use [numDisplayed] instead of [numfound].>>The second founditems context and your shownext code should stay exactly >as you have it now, and all this code should appear below the first >founditems context and before the ending [/search] tag.>Ken,I had a lot thinks to do in the past two weeks and I didn't fix this problem, but now I'm ready to do it, I pick up this e-mail from my webcat notes and I have a question.How can I do the math routine?Do you have an example to post it here?I try this one I found in the archive but it doesn't work:[math][founditems][numDisplay]+[/founditems]0[/math]I also try:[math][numDisplay]=[founditems]1+[/founditems]0[/math]it shows 10 as result because I have set &max=10 in the search context but I need the total items displayed but [numDisplay] is 0Thanks-Rodolfo-------------------------------------------------------------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:
>>Hi there,>>>>I have a shownext context like this:>>>>[search>>group1field=Categoria+Subcategoria+Modelo+Marca+Nombre+DecripcionCorta+Desc>>ripcionLarga&db=mydatabase.db&wogroup1data=[busqueda]&Nombresort=1&Nombresd>>ir=as&max=10&startat=[startat]]>>>>[shownext position=begin&max=1&method=POST]>href=resbusquedasolo.tmpl?startat=[start]&busqueda=[busqueda]> [start]>>- [end][/shownext] [numFound] items found>>>>[shownext position=end&max=1&method=POST]>href=resbusquedasolo.tmpl?startat=[start]&busqueda=[busqueda]> [start]>>- [end] [/shownext]>>>>[founditems]>> [showif [SePublica]=T] Some Fields [/showif]>>[/founditems]>>>>>> [/search]>>>>>>This count all the records found (2 for this example), inside the>>founditems I have a show if context to show the records if a flag is>>True, when I do a search it shows for example 2 items found but if one>>is flaged with False the results page shows one item but it shows 2>>items found also.>>It is confused for the user to see one record but the page said 2 items>>found.>>>>How can I fix this?>>>The easiest way is to use two founditems contexts in your search:>>The first must appear before any other code inside your search context, >and it will need to use a math routine that totals up all the items >displayed and sets the total to a text variable named [numDisplayed].>>Then you can use [numDisplayed] instead of [numfound].>>The second founditems context and your shownext code should stay exactly >as you have it now, and all this code should appear below the first >founditems context and before the ending [/search] tag.>Ken,I had a lot thinks to do in the past two weeks and I didn't fix this problem, but now I'm ready to do it, I pick up this e-mail from my webcat notes and I have a question.How can I do the math routine?Do you have an example to post it here?I try this one I found in the archive but it doesn't work:[math][founditems][numDisplay]+[/founditems]0[/math]I also try:[math][numDisplay]=[founditems]1+[/founditems]0[/math]it shows 10 as result because I have set &max=10 in the search context but I need the total items displayed but [numDisplay] is 0Thanks-Rodolfo-------------------------------------------------------------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
Rodolfo de la Garza
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:
removing commas from a preformatted number (2000)
Special delete ... (1997)
[WebDNA] html email.. should be a no-brainer.. but it is not parsing. (?) (2010)
Banner Rotation (2000)
CC Merchant suggestions?? (1997)
problems with 2 tags (1997)
Help name our technology! (1997)
updating the database (2000)
[SearchString] problem with [search] context (1997)
Template Not Found (1998)
Where's Cart Created ? (1997)
using showpage and showcart commands (1996)
RSH [shell] calls. (2004)
Claris HomePage messes up the code (1997)
International Orders (1998)
Reference data: ip-to-country (2004)
Date Range Sorting (1997)
Question about replacing words (1998)
read and write you own cookies with webcat (1997)
RE: Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998)