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:
AND/OR searches in WebCat 3.07 (2003)
WebCatalog can't find database (1997)
Search returns all, not 20 (1997)
WildWEBCAT98 Voting is OPEN! (1999)
[WebDNA] WebDNA Server 8.6.2 snapshot available (2019)
t or f (1997)
WebCat2b15MacPlugin - [protect] (1997)
Exclamation point (1997)
Anyone ever have this email problem? (2004)
READFILE command? (1998)
Secure Server basic question... (1997)
Help getting [shownext] to increment (2003)
NT Manual (1997)
[OT] Mom's gift (2006)
NT Setup (1998)
WebDNA Monitor (2005)
WebTen? (1997)
Separate SSL Server (1997)
Explorer 3.0/ Access Denied! (1997)
includes (2003)