The global search block allows end users to search tables that have been added to the End User Interface (EUI). You can configure the global search block by editing records in the EUI Templates table so that different or additional tables are searchable.
This article describes how you can manually edit the necessary code in each record to make additional tables searchable. However, it's typically easier to automatically generate the code, especially if you're adding an entirely new table to the EUI. For more information on how to automatically generate the code, see Working with Tables.
Before making changes to the EUI, we recommend that you have a basic understanding of the following topics:
For more information on HTML and CSS, visit W3 Schools. |
Tables can be added to the global search block by editing two records in the EUI Templates table. The home-multiple-search.htm
record controls the tables that are displayed on the global search block, and the multiple-search-result.html
record configures the search result page for each table. Both records must be configured correctly to search tables from the global search block.
Before you start, go to the setup wizard for the table you want to add and note the following information:
|
This template controls the tables that are displayed on the global search block.
translation.properties
and scroll until you reach the home.search
properties. Immediately following each home.search
property is a unique value associated with each EUI table, such as inc
, pr
, and cr
.translation.properties
record.Edit home-multiple-search.htm
and scroll to the first instance of this code.
#if (($ewText.get("show.service.requests")=="yes")&&($ewPermission.table("helpdesk_case","view_own"))) <input name="tables" type="checkbox" onclick="selectSearch(this)" value="sr" id="sr"> <label for="sr">$ewText.get("home.search.sr")</label> <br> #end |
Copy the entire code from #if
to #end
and paste it directly below #end
.
Replace the plural table label following show.
on the first line with the new plural table label, formatted as show.table.label
. For example, if adding the Change Request table, it should read show.change.requests
.
Replace helpdesk_case
on the first line with the new logical table name, such as change_request
.
sr
with the unique value you wrote down in Step 3.Ensure your code is free from errors. Here's the complete code we added for the Change Request table example:
#if (($ewText.get("show.change.requests")=="yes")&&($ewPermission.table("change_request","view_own"))) <input name="tables" type="checkbox" onclick="selectSearch(this)" value="cr" id="cr"> <label for="cr">$ewText.get("home.search.cr")</label> <br> #end |
Click Save.
This template configures the search result page for each table.
In the EUI templates table, edit multiple-search-result.html
and scroll to the first instance of this code.
#if ($queryTables.contains('sr') ) <div class="main_frames"> #ew_table("helpdesk_case" "" $defaultsearch "" "showToolBar=false&showNavigation=true&showfastsearch=false&showSearchCriteria=false" "my_table01" "") </div> #end |
Copy the entire code from #if
to #end
and paste it directly below #end
.
sr
on the first line with the correct value from the translation.properties
record.helpdesk_case
on the third line with the new logical table name.Continue scrolling to find the first instance of this code. Note that the my_table
parameter must be unique and must match the name provided in the #ew_table
parameters for the same table.
#if ($queryTables.contains('sr')) #ew_query("helpdesk_case" "my_table01" "queryId" "showToolBar=false&showNavigation=false&showfastsearch=false") #end |
Copy the entire code from #if
to #end
and paste it directly below #end
.
sr
on the first line with the value from Step 3.helpdesk_case
on the second line with the logical table name from Step 4.show.(table.label)
in the translation.properties
record is set to Yes.Tables can be removed from the global search block by editing the home-multiple-search.htm
record on the EUI Templates table.
Edit home-multiple-search.htm
and scroll to the first instance of this code.
#if (($ewText.get("show.service.requests")=="yes")&&($ewPermission.table("helpdesk_case","view_own"))) <input name="tables" type="checkbox" value="sr" id="sr"> <label for="sr">$ewText.get("home.search.sr")</label> <br> #end |
Continue scrolling until you find a similar block of code with the logical table name of the table you want to remove. The logical table name is near the end of the first line—helpdesk_case
in the above example. For other tables, the code will be formatted exactly as above but will contain values appropriate to that table.
yes
value and click Save. The table is now removed from the global search block, but if you ever need to add it back, you can just add yes
back where it was.Related articlesRelated articles appear here based on the labels you select. Click to edit the macro and add or change labels. |