Sunday 17 July 2016

Building an Apex 5 Search Screen



APEX - explore the possibilities...

Building an Apex 5 Search Screen 

Search screens have always been a main feature of APEX applications, & there are many ways they can be implemented. Designing an interactive report gives the user a large amount of search & filter options, but can be slow & all the features many not be required. If you create a classic report page, you can mention that you would like a search bar. This is a much execution which obtains a text field page item and then uses the value entered into it in LIKE clause in the query. Second option is to make a search bar from start. Close to the one generated by the classic report wizard, but now you have full control over which columns are already searched & can also easily add any other filters you like.
Few days back I was asked to create Google Search by a user.  This is a very common request for me & mostly comes from users being used to the fast, predictive searching available on Search Engine Google.com. It could be tough to explain to the users that Google took many years & huge amount of money to develop their search tools and this is not possible for a small organization.


Predictive search bars
The main feature to duplicate is the predictive issue in the search bar and I didn’t have to do much work to get this working. By using a Text field with autocomplete item and supplying the database column you are searching. The field will predict what you are searching for based on what you have already typed.

Building an Apex 5 Search Screen - Abacasys

As you type, the results are reduced on what you have entered.

Building an Apex 5 Search Screen - Abacasys

Refresh Results

Another great feature we might want to duplicate from Google search is the automatically updating results set. Using dynamic actions we can make something similar in APEX.
A dynamic action with an event ‘Key Release’ should be attached to your autocompleting text field. This will fire every time a character is typed into the field. Just add a refresh true action that refreshes a classic report region containing the results. You may also need to upper the text entered so that the search brings back all the expected results. 

Building an Apex 5 Search Screen - Abacasys


Further typing into the search field cut the number of results displayed. Now there is no need to show ‘search’ as now that the report refreshes automatically.
Building an Apex 5 Search Screen - Abacasys


We can take this significantly further and add more filters to our search page which also cause the report to refresh when changed, giving the user a way to search data that feels a bit more modern than a regular search bar.
Building an Apex 5 Search Screen - Abacasys

For Daily Updates keep Visiting Abacasys

No comments:

Post a Comment