Page tree
Skip to end of metadata
Go to start of metadata

Using Default Searches

Default searches can be configured on specific pages in the EUI to determine the records that are displayed. For example, when a user clicks a page, it may make sense to only display records to which they need to respond rather than all records involving that user.

Updating the Default Search

To update the default search, you can use an existing saved search or create a new saved search.

  1. Navigate to the table that contains the records on which you want to run the search. 
  2. Hover over the down arrow on the Search drop-down. Note the name of the new default search you'd like to use, or click New to create a new saved search that will be used as the new default search.
  3. Navigate to the EUI Templates table. 

  4. Edit the .html record that corresponds to the page in the EUI on which you'd like the search to run. 
    Note: By default, the .html records you need to edit are named after the page titles in the EUI. For example, the My Service Requests page is my_servicerequests.html, the My Incidents page is my_incidents.html, and so on.

  5. Locate the line of code beginning with #set that lists the current default search:

    #set ($defaultsearch="My Incidents")
      <div class="wrapper">
        <div class="top-space"></div>
        <div class="main">
          #ew_include("header.htm")
          <div class="content">
            <div style="float: left"><h2>$ewText.get('myinc.header')</h2>
            <div class="title-desc"></div></div>
            #ew_include("my_incidents-search.htm")
            #ew_status()
            <div id="main_frame">
              #ew_table("incident" "" $defaultsearch "" "showToolBar=false&showNavigation=true&showfastsearch=false" "my_table" "")
  6. Following ($defaultsearch= in the first line, replace the name in quotation marks with the name of the new default search.
  7. In the last line of the code block shown above, ensure $defaultsearch is listed in the second set of quotation marks after #ew_table. 
  8. Click Save. The default search is now updated.