|
The Lookup function gives the user the ability to find records in the database.
The Lookup function is similar to the Query function, but the Lookup function has more options for displaying, modifying, adding, and working with records than the Query function.
The default Lookup page can be divided into three sections - the toolbar section, the Lookup section, and the results section.
Default Behavior
- Template - the default template is identified in the Table Defaults but that can be overridden in the function call via the &page=[template name] parameter. The typical function call for the Lookup function would be:
wceweb.dll?function=lookup&etable=[table name]
- The Lookup function is often called from the Sidebar. Lookup icons also
apear in the Toolbar of a Lookup page to perform the Lookup function on
additional tables. The Lookup function is also often called from a
Subentity List function template.
General Tags - many WiredContact tags are similar to tags for other functions.
Also, there are many tags that are only useful in rare or specific instances.
This may require a discussion
Toolbar Section
This section has the icons that allow the user to move quickly to one click
lookups, navigate to the user's contact record, schedule activities, or add
notes, history items, or other Subentity items, print, use Edit/Replace, Delete,
and many other activities.
Toolbar Section Tags
- <#Recent... creates a lookup based on the CreateDate field specified
in the Table Defaults. The default behavior is to show records created
within the past 10 days.
Parameters
- Days=x - specifies how many days to show - the default is 10
- Edit - Uses the EditTime field instead of the CreateTime field
- Image=[path] - use image for function icon
- page=[template] - override default template for this function
- Teams=yes - limits lookup to those records where the
RecordManager is a Team Member of the current user
- Recordmanager=yes - limits lookup to those records where the
user is the RecordManager
- RecordmanagerREdit=yes - limits lookup to those records where
the EditUser field is the current user
- <#MyEntities...> creates a lookup based on the RecordManager field
specified in the Table Defaults.
Parameters
- Teams=yes - limits lookup to those records where the
RecordManager is a Team Member of the current user
- Image=[path] - use image for function icon
- page=[template] - override default template for this function
- <#MyRecord...> - displays a link to the contact record assigned to
the current user. From the contact record, the user may update user
address/phone/email as well as link to the User Settings dialog for that user
- <Action..> tags
- <#ColumnSelect...> - Allows the user to change the columns displayed
on the lookup results
- <#EditReplace...> - If the user has permission to perform Edit/Replace,
displays the dialog that will bring up the Edit/Replace dialog
- <#DeleteLookup...> - If the user has permission to perform Delete Lookup
and Delete, displays the dialog that will bring up the Delete Lookup dialog
Lookup Section
This section contains the elements that allow a user to specify which records to show.
Lookup Section Tags
Results Section
This section describes how to show the results of the user's Lookup, which data
elements to show, and which data elements the end user will be able to modify
directly in the results without navigating to a different page.
Results Section Tags
- The main results section uses WiredContact Detail Section Use Ajax Tags
to display icons for exploding views.
- <#ShowResults...> - displays the lookup results.
Parameters:
- Count=[x] - where [x] is the number of records to show on a page.
Fewer records per page improves performance.
- OrderBy=[Order By Clause] - Specify an alternate default sort order.
- <#ShowSQL> - displays the last query's SQL statement. For debugging
purposes. This tag must come after the <#ShowDetails> tag.
General Tags
- Service Tags including <#params and <#date
- <#PRINT...> - displays the Print icon - when clicked brings up the current
Lookup. By using the <#noprint>/<#/noprint> tags, you can exclude text
from the Lookup Print function. For example:
Some Text
Some text
<#noprint>
Text not shown with Print function
Text not shown with Print function
<#/noprint>
Some Text
Some text
This tag is easier to use than the <#MSGNOPRINT value="text to show
when not using the Print Function"> tag.
Parameters
- IMG=[image file path] - the default is images/print.gif
- Page=[Template Name] - if you want to use a different template
than the default template
- Count=x - where x is the number of items to limit the report to.
- <#MSGPRINT value="Text to show only with the Lookup Print function">
- <#UserField...>tag
- <#SysUserField...> tag
- <#include...> tag
- <#LayoutTest...> tag
- <#ParentSecurity>
- Static Report
- Wizard Report
- <AjaxJS...> tag
- <AjaxResults..> tag
- <#TABLENAME> - is replaced with the table's name specified in the
Table Defaults:Label field
- <#SITEMESSAGE name=[site settings parameter name]> - is replaced
with the value of the Site Setting You may use Admin...Site Settings...Misc Settings...Custom Settings to specify a site setting, or create your own
Admin Site Settings template to create a custom message to display
- on the Lookup.
- <#TEAM> - is replaced with the user's first team.
- <#TEAMS> - is replaced with all of the the user's teams, separated by
commas.
- <#TABLEDEFAULT name=[default parameter name]> - displays the value
of a Table Default parameter
- <#DBPARAMS paramname=paramvalue> - overrides the Table
Defaults setting the [paramname] to the new [paramvalue]. Primarily used
when using the lookup function with a subentity table to modify the default delete
and edit functions. For example, the default template for a subentity would typically
be the list view template for viewing under the entity. But when linking to the
subentity view from the lookup, the main template would be would be the Edit view template.
- <#LOGPARAMS> - display the complete parameters list in the WiredContact
Errors.log file
- <#LOGDBPARAMS> - display the complete Table Defaults in the WiredContact
Errors.log file
- <#ALLOWBLANKENTITYID> - under special circumstances, you may want to do
a lookup where a uniqueid is not available. Use this tag to override the default behavior which prohibits records with no uniqueid
- <#DUPLICATESUPPRESS field=fieldname field=fieldname ...> - don't show
duplicate records. When the results are sorted, if the values for the fields in the
next record match the values in the current record, the next record will not be shown.
- <#REVERSESORT field=fieldname field=fieldname ...> - where the fields are those
that you want an initial Descending sort instead of the default Ascending sort.
- <#RMID value="My Contacts List message"> - Informational message when
the user selects "My Contacts/Entities" from the toolbar
- <#RCID value="Recent Contacts List message"> - Informational message when
the user selects "Recent Contacts/Entities" from the toolbar
Additional Drop downs needed?
To show the complete list on the left hand side as well as the right hand side to show all fields just pase this code over the existing code.
<table>
<tr><td valign=top nowrap>
<#lookup><br>
<#lookup><br>
<#lookup><br>
<#lookup><br>
<#lookup>
</td><td valign=top nowrap>
<#lookup><br>
<#lookup><br>
<#lookup><br>
<#lookup><br>
<#lookup>
</td><td valign=bottom nowrap class=text>
Or Lookup <input type=checkbox name=orlookup value=Y class=checkbox><br>
Add To Lookup <input type=checkbox name=addtolookup value=Y class=checkbox><br>
Narrow Lookup <input type=checkbox name=narrowlookup value=Y class=checkbox><br>
</td>
</tr>
<tr><td colspan=2 align=right class=text>Keyword Search:<input name=keyword class="LookupTextFieldClass"> <input type=submit value="Lookup Now" class=button></td>
<td></td></tr>
</table>
|