Search Files (Datasets)
...
Panel |
---|
|
Search pages are XML files used to search for certain information, based on certain criteria |
...
Image Removed
...
, and can be used in both summary and data entry pages.
What does this section cover? |
Creating Search Pages
To create a new datasetsearch page, we you 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 under: ../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
The results are retrieved based on an SQL script constructed using the information from the XML file and the criteria entered by the user.
In the following example loadservices.xml is created under ../pages/search/inventory and then we create a new XML file named loadwarehouses.xml
...
products
Ui expand |
---|
title | Search Services Example |
---|
|
| language | xml | loadwarehousesloadservices.xml | linenumbers | true |
---|
collapse | true |
---|
| <dataset<?xml version="1.0" encoding="UTF-8"?><dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/search.xsd">
| <searchcaption>Search Warehouses<<searchcaption>key_search_services</searchcaption>
| <sqltype>SELECT<<sqltype>Select</sqltype>
<entitytable>PRODUCTS</entitytable>
<entityfield>PRODID</entityfield>
<tables>
<table><tablename>PRODUCTS</tablename></table>
<table><tablename>PRODUCTTYPES</tablename></table>
<table><tablename>PRODUCTBRANDS</tablename></table>
| <table><tablename>WAREHOUSE<<table><tablename>PRODUCTFAMILIES</tablename></table>
</tables>
<joins>
<join>
<indexorder>1</indexorder>
<outertable>PRODUCTS</outertable>
<innertable>PRODUCTTYPES</innertable>
<jointype>RIGHT</jointype>
|
<joins/>
<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>WAREHOUSEWRHID<PRODID</field>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>32</fieldlen>
<searchcriteria>0</searchcriteria>
<visible>0</visible>
<executable>1</executable>
<indexorder>10</indexorder>
</fielditem>
<fielditem>
<field>PRODUCTS.PRODCODE</field>
<label>key_product_code</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>32</fieldlen>
<searchcriteria>1</searchcriteria>
<visible>1</visible>
<executable>1</executable>
| <indexorder>1<<indexorder>20</indexorder>
</fielditem>
<fielditem>
<field>PRODUCTS.PRODTYPEID</field>
<label>key_product_type</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>32</fieldlen>
<searchcriteria>1</searchcriteria>
<visible>0</visible>
<executable>1</executable>
<lookup>dataset;products.loadtypes;prodtypeid;prodtypename</lookup>
<indexorder>30</indexorder>
</fielditem>
<fielditem>
| <field>WAREHOUSEWRHNAME<<label>Name<<label>key_product_family</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
| <fieldlen>100<<fieldlen>32</fieldlen>
<searchcriteria>1</searchcriteria>
| <visible>1<<visible>0</visible>
<executable>1</executable>
| <indexorder>2<<lookup>dataset;products.loadfamilies;prodfamilyid;prodfamilyname</lookup>
<indexorder>40</indexorder>
</fielditem>
| <fielditem>
<field>PRODUCTS.PRODBRANDID</field>
<label>key_product_brand</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>32</fieldlen>
<searchcriteria>1</searchcriteria>
<visible>0</visible>
<executable>1</executable>
<lookup>dataset;products.loadbrands;prodbrandid;prodbrandname</lookup>
<indexorder>50</indexorder>
</fielditem>
<fielditem>
<field>PRODUCTS. |
PRODALTCODE</field>
<label>key_alternative_code</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>32</fieldlen>
<searchcriteria>1</searchcriteria>
<visible>1</visible>
<executable>1</executable>
<indexorder>60</indexorder>
</fielditem>
<fielditem>
<field>PRODUCTS.PRODDESC</field>
<label>key_description</label>
<expression>VALUE</expression>
<datatype>ftXString</datatype>
<fieldlen>255</fieldlen>
<searchcriteria>1</searchcriteria>
<visible>1</visible>
<executable>1</executable>
<indexorder>70</indexorder>
</fielditem>
</fields>
|
<wheregroups>
<wheregroup>
<wherefields>
<wherefield>
<field>PRODUCTS.PRODDELETED</field>
<alias>Expr001</alias>
<expression>VALUE</expression>
</wherefield>
<wherefield>
<field>0</field>
<alias>Expr001</alias>
<expression>VALUE</expression>
</wherefield>
</wherefields>
<wheremembers>
<wheremember>
<lparenth>0</lparenth>
| <lfield>WAREHOUSEWRHDELETED<PRODDELETED</lfield>
<expression>=</expression>
<rfield>0</rfield>
<rparenth>0</rparenth>
<andor>AND</andor>
</wheremember>
<wheremember>
<lparenth>0</lparenth>
<lfield>PRODUCTTYPES.PRODTYPECLASSIFICATION</lfield>
<expression>=</expression>
<rfield>'SERVICES'</rfield>
<rparenth>0</rparenth>
<andor>AND</andor>
</wheremember>
</wheremembers>
</wheregroup>
</wheregroups>
|
|
...
Expand |
---|
title | Search Services Page |
---|
| Image Added |
|
For more information on customising search pages, go to Customize Search Pages. For a full list of search file (dataset) page attributes, go to Search Files (Datasets) Documentation Pages Documentation.
To start continue implementing the controller view layer, go to 5. Developing the Controller layerDeveloping summary pages (Deprecated)