Home > WebEOC > Admin Guide > HTML Conventions > Filter and Search Tags

Filter and Search Tags

Filter and search tags can help you locate and sort board data.

For allowed values and requirements, refer to Attribute Definitions.

Tags

<clearsearchbutton>

The <clearsearchbutton> tag places a Clear Search button in the Board Editor user interface. When included in the code, this tag suppresses all default search buttons. Refer also to <searchbutton>.

<filter>

A selection item representing a view filter; parent must be <filterdropdown>

Attribute

Allowed Values

Requirements

Description

name

%viewfiltername

Required

Name of the view filter.

Nested inside the <filterdropdown> tag, the <filter> tag would appear something like:

<filterdropdown defaulttext="All">
<filter name="Open Filter">Open</filter>
<filter name="Closed Filter">Closed</filter>
</filterdropdown>

<filterbutton>

Enables a view filter; rendered as a button. This filter button can be used to toggle filter activation from a display view. You can also group multiple filter buttons together for mutual exclusion (radio button behavior).

The group attribute is to group the filter buttons so that only one filter may be activated at a time.

Attribute

Allowed Values

Requirements

Description

group

CDATA

Optional

An ID to group Filter buttons as mutually exclusive so that only one filter may be activated at a time.

id

text

Optional

HTML ID attribute.

name

%viewfiltername

Required

Name of the view filter.

title

text

Optional

HTML title attribute.

Example

<filterbutton name="My Requests" group="priority">
<on>
<b>My Requests</b>
</on>
<off>
My Requests
</off>
</filterbutton>
Disable Filter Buttons

To disable filter buttons when they are turned on and cannot be turned off by clicking them directly, use the following code:

<filterbutton name="a" group="group1">
<on>
<attribute name="disabled">true</attribute>
<b>a</b>
</on>
<off>a</off>
</filterbutton>

<filterbutton name="b" group="group1">
<on>
<attribute name="disabled">true</attribute>
<b>b</b>
</on>
<off>b</off>
</filterbutton>

<filterdropdown>

Allows selection of different view filters; same as multiple <filterbutton> tags, but renders in a drop-down format.

Attribute

Allowed Values

Requirements

Description

defaulttext

CDATA

Required

First option in the drop-down that represents no filters applied.

id

text

Optional

HTML ID attribute.

title

text

Optional

HTML title attribute.

Example

<filterdropdown defaulttext="All">
<filter name="Open Filter">Open</filter>
<filter name="Closed Filter">Closed</filter>
</filterdropdown>

<filterlistdropdown>

Allows filtering based off of a WebEOC list.

In some respects, this tag works the same as the <filterdropdown> tag. In this case, however, you can add the tag to the view’s code and it does not require the creation of filters in the display view for it to work. You must specify in the tag which WebEOC list to use. As list items are added, edited, or removed using the Lists Manager, the changes are automatically reflected in the filter.

Attribute

Allowed Values

Requirements

Description

list

%listname

Required

Name of the WebEOC list to use as the values in the Filter drop-down field.

Note: Tiered lists are not supported.

field

%fieldname

Required

Name of the field to be filtered.

Note: The view must have a corresponding <eocfield> entry inside the <eocrepeatallrecords> opening and closing tags. If the corresponding <eocfield> tag is not provided, the drop-down appears, but it is empty. Also, if you provide a field value but it is not being shown, it needs to be inside a hidden container tag, such as a <span> or <div>.

defaulttext

CDATA

Optional

First option in the drop-down that represents no filters applied.

parent

%fieldname

Optional

Name of the parent filterlistdropdown's field to be filtered.

Example

<filterlistdropdown defaulttext="All" field="state" list="States">
</filterlistdropdown>
<filterlistdropdown defaulttext="All" parent="state" field="county" list="States">
</filterlistdropdown>

Note: Do not include an ID attribute in the <filterlistdropdown> tag.

Tip: Tiered lists can be used for this tag and its attributes.

<off>

Text to display when a view filter is off; parent must be a <filterbutton> tag.

Example

<filterbutton name="My Requests" group="priority">
<on>
<b>My Requests</b>
</on>
<off>
My Requests
</off>
</filterbutton>

<on>

Text to display when a view filter is on; parent must be a <filterbutton> tag.

Example

<filterbutton name="My Requests" group="priority">
<on>
<b>My Requests</b>
</on>
<off>
My Requests
</off>
</filterbutton>

<search>

Mechanism to search record data. This tag is specifically meant to add search capabilities to the display view of a board.

In WebEOC versions 7.2 and later, this tag is more flexible and allows searching across multiple fields, the use of multiple search tags, and searching over ranges. When multiple search tags are used, the criteria from all the active search tags must be met.

When this tag is combined with the <searchbutton> and <clearsearchbutton> tags, you can set up a more customized look.

Attribute

Allowed Values

Requirements

Description

cleartext

(CDATA) "Clear Search"

Implied

Text that appears in the local Clear Search button. The default is set to Clear.

field

%fieldname

Optional

Name of the field; use child <field> tags for multiple fields.

exact

(false|true)false

Implied

Whether the search is an exact match or just contains the search string. If true, the entire string must be present in the record; the entire word or the first part of the word must be matched.

range

(false|true)false

Implied

Searches a range of values entered via two text boxes.

The default is set to false. If set to true, a second text box appears to allow both a "from" and "to" value to be specified.

rangetext

(CDATA) "to"

Optional

Text that appears between the range's from and to text boxes. The default is set as to.

searchtext

(CDATA) "Search"

Implied

Text that appears in the local Search button. The default is set to Search.

showcalendar

(false|true)false

Implied

Displays the calendar control, allowing easy date entry when searching datetime fields. The default is set to false.

showclear

(false|true)false

Implied

Displays the local Clear Search button, allowing users to clear filters. For backwards compatibility, the default is set to false.

Add this button using one of the following two methods:

1. <search field="description" showclear="true" />

2. <search field="description" /><clearsearchbutton />

Example

<search field="description" exact="false" range="false" rangetext="false" showcalendar="false" showclear="true" searchtext="Find">
<field name="Priority"/><field name="Name"/><field name="Status"/>
</search>
<clearsearchbutton/>

<searchbutton>

Allows you to place the Search button in a specific location. This is most useful when using multiple search tags. This tag suppresses individual search buttons from displaying next to search tags on the view. The text of the button corresponds to the contents of the tag.

When using multiple search tags, the operand AND is assumed. This means that the criteria specified in all of the search tags must be met. Refer also to <clearsearchbutton>.

You must to post a comment.
Last modified

Tags

Classifications

This page has no classifications.