Skip to end of banner
Go to start of banner

Search Files (Datasets)

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 5 Next »

Search Files (Datasets)

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

Dataset

Creating the Search Files (Datasets)

To create a new dataset, 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 datasets 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
<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 file (dataset) attributes, go to Search XML Files (Datasets) Documentation

 

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

  • No labels