Use the following query strings
options to query your data and drill down into particular records and even columns.
and Square Brackets
to build custom behaviors for your websites and share data
on other websites.
Selecting the Data to Display
The most important query string parameter is t
, which specifies the table from which to pull data. Since it's the most important, you'll probably use it with the ? like this:
?t=1005 or ?t=HelpTopics
For example, to display Help Topics in a Grid View, you would use this url:db.aspx?t=HelpTopics
You could display the HelpTopics on the Calendar View
Or in a Tree View
You can use either the ID of the Table or the TableName. You can get a list of tables from the Develop > My Tables menu.
Formatting the Data
Another useful parameter is the vid parameter which specifies which layout format to use from the Views
Table. With views, like with tables, we can use either the ID or the name of the view, like so:
&vid=1 Uses the Grid view.
Combine the t and vid parameters like this:db.aspx?t=HelpTopics&vid=1
<-- Click it and see. View 1 is the default view, so usually you will not need to specify &vid=1, unless a default view has been specified in the Table Settings
As another example, let's look at the Help Topics as a list of links:db.aspx?t=HelpTopics&vid=14
Sorting your data
To order the results by a column, simply add &orderby= to the end and specify the column number to order by. Adding multiple orderby parameters, or values separated by commas will reverse the order. For example &orderby=5 will sort the fifth column ascending and &orderby=5,5 will sort the fifth column in descending order. The sorted column in a grid view will be highlighted. A quick way to sort your data by most recently created items first would be to order by the ID field descending like this:db.aspx?t=HelpTopics&orderby=1,1
Filtering your data
You can filter your data many ways using the query string. If you would like to limit records to a particular value within a column add &columnname=value where columnname is the name of the column and value is the value for the filter. For example, to display a particular record you can reference that record by the ID.
Look in the location bar now and you will see:/db.aspx&t=helptopics&id=128&vid=11
Which means, show the item from the helptopics table using view number 11 and for the Help Topic with id equals 128.
If you would like to be more specific about your query, you can use query operators and query values like so
For example, to show only Help Topics that contain the word Parameters in the name, you could use a query string like this:db.aspx?t=HelpTopics&nameop=contains&namequery=Parameters
To show all help topics with created since May 1, 2008, you'd use this url: db.aspx?t=HelpTopics&createdateop=>&createdatequery=5/1/2008 contains
: Find items that contain the query value, same as containslike
: Find items that are like the value, same as containsnot like
: Find items that do not contain the query valuestartswith
: Find Items that start with the query value=
: Find items equal to the query value<>
: Find items not equal to the query value>=
: Find items greater than or equal to the query value>
: Find Items greater than the query value<
: Find items less than the query value<=
: Find items less than or query equalin
: Specify a list of items. Example: &idop=in&idquery=1,2,3&pagesize=
Determines how many records are shown. Do you want 20 Help Topic Links
or 50 Help Topic Links
By Default, the page size is pulled from the Table Settings&hidecolumns=
Determines which column names should be hidden Help Topics without the description field&selectcolumns=
Determines which column names should be pulled from the database. Show Id, Name and CreateDate&noheader=true&nofooter=true
Hides the page header and footer Help Topics sans Header/Footer
These will be useful when using the Share Data
feature when you want to include data, but not the menus and content in the right rail. We call it the footer because it appears at the bottom of the HTML source, even though it is rendered on the right hand side of the page. You can use Skins
to change this behavior._fieldvalue=fieldname
This parameter used in conjunction with the id= parameter will show only the contents of the specified column. For example, to show only
the description for this Help Topic, use the following url:db.aspx?t=HelpTopics&id=128&_fieldvalue=description&qid=
Allows you to specify one of your custom Ad Hoc Queries
to filter the records or build complex joins among tables.