Databases Reference
In-Depth Information
Adding Reset Pagination
Any time you add a Search item to a page, it's a very good idea to also add a Reset Pagination process. This prevents
the APEX reporting engine from losing its place in a result set:
1.
Edit
Page 200
of the application.
2.
In the upper-right section of the page, click the
Create
button and select
Page control on this page
.
3.
Select
Process
, and click
Next
.
4.
Select
Reset Pagination
, and click
Next
. You should see the dialog in Figure
6-49
.
Figure 6-49.
Specifying process options
5.
Ensure that
Scope
is set to
Current Page
, and click
Create Process
.
6.
Run the application.
The search function should work when the user presses Enter and when the user clicks the Go button. But let's go
one more step and alter the Subject column so the search term is highlighted in red:
1.
Edit
Page 200
of the application.
2.
Edit the
Report Attributes
again by right-clicking the
Tickets
region and selecting
Edit
Report Attributes
.
3.
Edit the
Subject
column by clicking the
Edit
icon.
4.
In the
Column Formatting
region, enter
&P200_SEARCH.
in the
Highlight Words
element.
Make sure you include the period (
.
) at the end. If you forget it, the variable won't be
parsed correctly and therefore the value won't be highlighted.
This process uses APEX session state to indicate that the value the user entered into
P200_SEARCH
should be used
to highlight that same text in the Subject column. Continue as follows:
5.
Click
Apply Changes
.
6.
Run the application, and test the search-highlight capability.
Now, when you enter a Search value, the matching rows are returned with the search term highlighted in red.
In just a few minutes, you've created a sortable, searchable report for your Help Desk system. Let's look at what the
report looks like behind the scenes. Figure
6-50
shows the components as seen from the Application Builder.