Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
nameblue

Search Pages Documentation

Search pages are the xml files that contain database query definitions. To refer to a search page from the code the <searchpage_folder>.<searchpage_filename> is used. 

Child pages (Children Display)

Attributes

Name
Description
Value
searchcaptionA title which is display at the screenAny
sqltypeThe type of SQL scriptSELECT or SELECT DISTINCT
tablesA list of tables to be used in the Joins and fields sectionsAny table name that exists in database
joinsA list of elements to join the tables2.3.1. Join
fieldsThe fields that are used in select and where clausesField
wheregroups 2.3.3. Wheregroup
groupbyCollect data across multiple records and group the results by one or more fields.Any field name
orderbySort the query result set based on one or more fields.2.3.4. Order By

Example

Expand
titleSearch Page

Code Block
themeEclipse
languagexml
titleSearch Page
<?xml version="1.0" encoding="UTF-8"?>
<dataset xmlns="http://www.crm.com/xmlschema/dataset.rng">
	<searchcaption>Search Products</searchcaption>
	<sqltype>Select</sqltype>
	<tables>
		<table><tablename>PRODUCTS</tablename></table>
		<table><tablename>PRODUCTTYPES</tablename></table>
		<table><tablename>PRODUCTBRANDS</tablename></table>
		<table><tablename>PRODUCTFAMILIES</tablename></table>
	</tables>
	<joins>
		<join>
			<indexorder>1</indexorder>
			<outertable>PRODUCTS</outertable>
			<innertable>PRODUCTTYPES</innertable>
			<jointype>RIGHT</jointype>
			<conditions>
				<conditionitem>
					<outerfield>PRODTYPEID</outerfield>
					<condition>=</condition>
					<innerfield>PRODTYPEID</innerfield>
					<andor>AND</andor>
				</conditionitem>
			</conditions>
		</join>
		<join>
			<indexorder>2</indexorder>
			<outertable>PRODUCTS</outertable>
			<innertable>PRODUCTBRANDS</innertable>
			<jointype>LEFT</jointype>
			<conditions>
				<conditionitem>
					<outerfield>PRODBRANDID</outerfield>
					<condition>=</condition>
					<innerfield>PRODBRANDID</innerfield>
					<andor>AND</andor>
				</conditionitem>
			</conditions>
		</join>
		<join>
			<indexorder>3</indexorder>
			<outertable>PRODUCTS</outertable>
			<innertable>PRODUCTFAMILIES</innertable>
			<jointype>LEFT</jointype>
			<conditions>
				<conditionitem>
					<outerfield>PRODFAMILYID</outerfield>
					<condition>=</condition>
					<innerfield>PRODFAMILYID</innerfield>
					<andor>AND</andor>
				</conditionitem>
			</conditions>
		</join>
	</joins>
	<fields>
		<fielditem>
			<field>PRODUCTS.PRODID</field>
			<expression>VALUE</expression>
			<datatype>ftXString</datatype>
			<fieldlen>32</fieldlen>
			<searchcriteria>0</searchcriteria>
			<visible>0</visible>
			<executable>1</executable>
			<indexorder>1</indexorder>
		</fielditem>
		<fielditem>
			<field>PRODUCTS.PRODCODE</field>
			<label>Product Code</label>
			<expression>VALUE</expression>
			<datatype>ftXString</datatype>
			<fieldlen>32</fieldlen>
			<searchcriteria>1</searchcriteria>
			<visible>1</visible>
			<executable>1</executable>
			<indexorder>2</indexorder>
		</fielditem>
		...
	</fields>
	<wheregroups>
		<wheregroup>
			<wherefields>
				<wherefield>
					<field>PRODUCTS.PRODDELETED</field>
					<alias>Expr001</alias>
					<expression>VALUE</expression>
				</wherefield>
				<wherefield>
					<field>0</field>
					<alias>Expr002</alias>
					<expression>VALUE</expression>
				</wherefield>
			</wherefields>
			<wheremembers>
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>PRODUCTS.PRODDELETED</lfield>
					<expression>=</expression>
					<rfield>0</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
			</wheremembers>
		</wheregroup>
	</wheregroups>
	<groupby/>
	<orderby/>
</dataset>