In the base query section you define directory styles for listing, sort orders and fields of the search panel.
Create the base query section in the xxx_Config.xml file (where xxx may be Ted4, Fred4, Shell4 or Edadmin4). See Which configuration file? for help about choosing the right configuration file.
Have in mind that some items of the base query section are referenced in the main tab section, defined in the xxx_Tabitems.xml file, thus the names have to be coherent.
The example below is a simple one, containing just one field in the directory style and in the search panes. It's obvious that you will need to add more fields to it to make it really usable.
The text in blue is free text, but referenced elsewhere, which means you can follow the specified naming indications, or you can specify what you want, but be coherent.
The text in red is related to the schema and must correspond to it exactly, obviously, in relation to the object you want to manage.
In this example, we're showing the base query for the contact object. If you would be setting up a main tab for another object, the object name and some descriptive strings will be different.
<BaseQuery Name="ContactsMainTab" ObjectTypeName="contact"> <DirectoryStyleList> <DirectoryStyle Name="List" Description="" Height="1" Width="-1"> <SortList> <Sort Name="Last Name"> <SortDescription PropertyName="[contact.lastName]" IsAscending="false" /> </Sort> </SortList> <ColStyle Name="Last Name" Width="150" Height="0" SortName="Last Name"> <CellTemplate> <TextBlock Height="Auto" HorizontalAlignment="Left" Text="{Binding Path=[contact.lastName]}" Padding="4,1,0,0" TextWrapping="Wrap"/> </CellTemplate> </ColStyle> </DirectoryStyle> </DirectoryStyleList> <SearchList> <searchObjectUI name="ContactsSimpleSearch"> <attribute path="[contact.lastName]"> <ui mode="Normal" orientation="Vertical"> <template kind="Single" opMode="Hidden" /> </ui> </attribute> </searchObjectUI> </SearchList> </BaseQuery> |
Below is the explanation of the key statements.
For the base query name it is recommended to use <objectname_plural>MainTab, e.g. if the object name is contact, then the first part of the base query name is recommended to be Contacts. It's however a free text, but it is referenced elsewhere, thus be careful should you want to modify it at any time after creation. The base query name is referenced in the xxx_Tabitems.xml file, in the related maintab section - that part links the tab item with the config data. <l:ShellData.ShellData> <l:ShellData> <l:ShellData.SearchCriteria> <l:SearchCriteria Name="ContactsSearch" BaseQueryName="ContactsMainTab" |
The ObjectTypeName attribute of the base query has to be exactly the same (including letter case) as the object schema name. In the above example it is contact, but of course, it is different for each object. Use EdAdmin4 (Application Configuration > Schema) to look at the schema and find out the object name. |
The Name attribute of DirectoryStyle is a free text that is displayed in the Style drop down box. Logically, it should reflect the type of the directory style. Typical names used throughout configuration are List, Details, Grid, Small Grid etc. The Name attribute of the DirectoryStyle may be referenced in some add-in scripts, thus be careful should you want to modify it at any time after creation. Normally, in every base query you will have at least one directory style, but often you may want to have them two or three. This simply means you will have to create a series of sections as below, one for each directory style. The first directory style defined will be the default one (system default). <DirectoryStyle Name="<myname>" Description="" Height="1" Width="-1"> .... </DirectoryStyle>
|
The Name attribute of Sort is displayed in the Sort drop-down box. Logically, it has to reflect what you specify in the SortDescription PropertyName="[contact.lastName], but it's a free text. The Name attribute of Sort is typically referenced in the ColStyle, and it may be referenced in some add-in scripts, thus be careful should you want to modify it at any time after creation. Normally, in each directory style, you will have at least the same number of sorts as the number of available columns in the directory style. The first one defined, is the default one (system default). |
The PropertyName attribute of SortDescription should be a content attribute you want to use as the sort criteria. It has to be exactly the same as the object name.attribute, and reflect what you specify in the Binding Path=[..] Use EdAdmin4 (Application Configuration > Schema) to look at the schema and find out the object name. |
The Name attribute of ColStyle is a free text that is displayed in the header of the listing. Logically, it is recommended that it reflects what you specify in the Binding Path=[..]. Normally, in each directory style, you will have more than one column. The columns appear in the listing in the definition order. |
The SortName attribute of ColStyle is a reference to the sort defined in the Sort Name=..., to be applied on the column when you click the column header. If you omit this statement, the given column won't be sortable. Normally, in each ColStyle, you will need a SortName. |
It is a content attribute you want to display in the listing. It has to be exactly the same as the object name.attribute. Use EdAdmin4 (Application Configuration > Schema) to look at the schema and find out the object names. |
This section encloses fields that appear on the search pane of the navigator for the given main tab. The name is referenced in the SearchName="..." section in the xxx_TabItems.xml file, thus be careful should you want to modify it at any time after creation. You may have one or more such sections. |
This section defines the fields that appear on the search pane of the navigator for given main tab. It is a free text that is referenced in the SearchName="..." section in the xxx_TabItems.xml file, thus be careful should you want to modify it at any time after creation. |