Skip to end of banner
Go to start of banner

4.3. Search Pages

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Search Pages

Search pages are used to search for information based on certain criteria stated in the search XML file.

Creating the Search Files

To create a new search file, we need to create a single XML file. Based on the business structure, the respective directories should be created. Based on CRM.COM naming conventions, all search files are stored in the ../pages/search/<module_name>/ directory. An SQL determines the information that will be retrieved and specified fields will be able to be displayed and/or searched for. 

 

In this case, we create a directory named ../pages/search/inventory and then we create a new XML file named loadwarehouses.xml

loadwarehouses.xml
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/search.xsd">
	<searchcaption>Search Warehouses</searchcaption>
	<sqltype>SELECT</sqltype>

	<tables>
		<table><tablename>WAREHOUSE</tablename></table>
	</tables>

	<joins/>

	<fields>
		<fielditem>
			<field>WAREHOUSE.WRHID</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>WAREHOUSE.WRHNAME</field>
			<label>Name</label>
			<expression>VALUE</expression>
			<datatype>ftXString</datatype>
			<fieldlen>100</fieldlen>
			<searchcriteria>1</searchcriteria>
			<visible>1</visible>
			<executable>1</executable>
			<indexorder>2</indexorder>
		</fielditem>
 
		...
 
	</fields>

	<wheregroups>
		<wheregroup>
			<wheremembers>
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>WAREHOUSE.WRHDELETED</lfield>
					<expression>=</expression>
					<rfield>0</rfield>
					<rparenth>0</rparenth>
					<andor>AND</andor>
				</wheremember>
			</wheremembers>
		</wheregroup>
	</wheregroups>

	<groupby/>

	<orderby/>

</dataset>

 

For a full list of search page attributes, go to Search Files (Datasets) Documentation

 

To start implementing the controller layer, go to 5. Developing the Controller layer

  • No labels