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:
linux WebCatalog ODBC MySQL (2001)
Use of Back and Reload Buttons on ShoppingCart page? (1997)
[WebDNA] WebDNA hosting (2012)
Plugin or CGI or both (1997)
Again: tcpconnect problem with authorize.net (2003)
Search all Fields in a db (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Auto SKU's (2000)
ErrorMessages.db (1998)
[WebDNA] test (2010)
Help! WebCat2 bug (1997)
Smart caching problems with 2.1b3? (1997)
Searching multiple fields from one form field (1997)
Pithy questions on webcommerce & siteedit (1997)
Running 2 two WebCatalog.acgi's (1996)
[WebDNA] form data compared to existing database (2016)
Email (1998)
math/text variable limits per page (2001)
different show next (1997)
Ampersand (1997)