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:
OT: Backup (2006)
Version f1 status (1997)
Webcat 2.0.1 date math bug -> Crash! (1997)
Redirect frame targets (1998)
webcat- multiple selection in input field (1997)
WebCat2_Mac RETURNs in .db (1997)
strip .0 off off IPaddress (1998)
aol not showing cart (1998)
Whats up with emailer? (1998)
AD Error Msg (1997)
Did you hear about this? (1997)
Another bug to squash (WebCat2b13 Mac .acgi) (1997)
Searchable WebCat (etc.) Docs ? (1997)
Database Locking?!? (2000)
Running 2 two WebCatalog.acgi's (1996)
[numfound] in nested [search] (2000)
webCat craps httpd (2005)
passing info to correct frame (2000)
[listfiles] (1998)
Re:2nd WebCatalog2 Feature Request (1996)