Re: [WebDNA] Sorting -- Dealing with Blanks
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100321
interpreted = N
texte = Tana Adams wrote:> Hi,> Does anyone know of a way to show all blank records for a particular > field at the bottom when using the sort feature? For example, I want to > be able to sort a field, in either ascending or descending order, and > always show any blank records for that particular field at the bottom. > I know I can use a showif/hideif but I was wondering if there was > actually a command for that that I’m missing within the sort feature itself.> > Thanks,> TanaTo always show blank records at the bottom when sorting via both ascendingand descending on text,num, or date formats is not really built in as far asI know. You would have to first write your founditems to a table and adda simple sorting field to that table based off of simple criteria...The sort field ("RANK" perhaps) could have a value of 0 if thefield is not blank, and a 1 if it is.Then search that table and do a 2 part sort.First sort would be a type=num sort on the RANK field thatis always descending. The second sort would be your ascend or descendsorts.yup, that should do it. :-)Donovan-- Donovan D. Brooke PH/FAX: 1 (608) 291-2024------------------------------------------------VPWebDNA Software Corporation16192 Coastal HighwayLewes, DE 19958
Associated Messages, from the most recent to the oldest:
Tana Adams wrote:> Hi,> Does anyone know of a way to show all blank records for a particular > field at the bottom when using the sort feature? For example, I want to > be able to sort a field, in either ascending or descending order, and > always show any blank records for that particular field at the bottom. > I know I can use a showif/hideif but I was wondering if there was > actually a command for that that I’m missing within the sort feature itself.> > Thanks,> TanaTo always show blank records at the bottom when sorting via both ascendingand descending on text,num, or date formats is not really built in as far asI know. You would have to first write your founditems to a table and adda simple sorting field to that table based off of simple criteria...The sort field ("RANK" perhaps) could have a value of 0 if thefield is not blank, and a 1 if it is.Then search that table and do a 2 part sort.First sort would be a type=num sort on the RANK field thatis always descending. The second sort would be your ascend or descendsorts.yup, that should do it. :-)Donovan-- Donovan D. Brooke PH/FAX: 1 (608) 291-2024------------------------------------------------VPWebDNA Software Corporation16192 Coastal HighwayLewes, DE 19958
Donovan Brooke
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:
Great product and great job ! (1997)
[date] problem with %d%m%Y (1998)
Size issues (2001)
Text data with spaces in them... (1997)
Separate SSL Server (1997)
[input] questions (1997)
GrandTotal not right (1997)
[WebDNA] Dates (2009)
[OT] Dedicated Image Uploader/Server [/OT] (2003)
WebCatalog not running (2000)
User that WebCatalog/Unix runs as (2000)
Re:One more time (1997)
[OT] Help Webcat 213 win (2000)
RE: Answer: WebDelivery downloads alias, not original ? (1997)
search context w shownext works! (1997)
different show next (1997)
Calendar Solutions (1998)
Webmerchant PC auth (1998)
Still trying to email... (1998)
Image size & weight limit on upload (2002)