Page 1 of 1

record list of my choosing

PostPosted: Wed Mar 30, 2016 11:59 am
by KenHos
I want to create a Query grid list of the records I choose in the order I choose. I setup a double Click subroutine like
this
:test2

If "[worship.words.list]" "=" "False"
SetVar "[mTOLIST]" "True"
dbpVarToRecord "worship" "words" "[mTOLIST]" "Delimiter=|;IncludeHidden=No"
Return
Else
SetVar "[mTOLIST]" "False"
dbpVarToRecord "worship" "words" "[mTOLIST]" "Delimiter=|;IncludeHidden=No"
Return
Endif

When I query too list=true it works fine. But the order in the grid is an alpha order. I want the records to show in the order I chose them.
Any Ideas, Please help.

PS. You guys and gals are the best, thanks for all the past help as I try and catch up.

Re: record list of my choosing

PostPosted: Thu Mar 31, 2016 6:45 am
by dpayer
One idea is to include a field that describes the order you want your display to come in.

Then use a SQL query

dbpSQLexec "MYDB" "SELECT MYFIELD1, MYFIELD2, MYFIELD3 FROM MYTABLE ORDER BY MYORDERFIELD"

You don't need to include the MYORDERFIELD in the select so it won't show up.

Here is a tutorial on SQL's ORDER BY instruction:

http://www.w3schools.com/sql/sql_orderby.asp