Skip to Main Content
Feature Request FR-4385
Product Area Page Components
Status OPEN

2 Voters

Save the chosen options in faceted search

lhutter Public
· Apr 2 2025

Idea Summary
Introduce a save button in a faceted search report where a user can save his/her chosen options.

Preferred Solution (Optional)
Next time an user opens the report, the saved options are the default options. 

One step further: like in interactive reports the user can make several alternative reports, with different names

This idea is open.

Comments

Comments

  • carsten.czarski APEX Team OP 2 weeks ago

    As facets are treated like page items, there is a very simple and straightforward way to add that on your own, as custom functionality. Add a table to your schema to hold the facets and their values, e.g.

    table my_stored_facets(
        stored_view_name    varchar2(255),
        facet_name          varchar2(255),
        username            varchar2(255),
        facet_value         varchar2(4000) );
    

    Then, simply have a page process firing on submit, which stores the current facet values into the table.

    begin
        insert into  my_stored_facets( 'View 1', 'PX_DEPTNO', :APP_USER, v( 'PX_DEPTNO' );
        insert into  my_stored_facets( 'View 1', 'PX_SAL',    :APP_USER, v( 'PX_SAL' );
        :
    end;
    

    Then, to load facet values from the table, you'd go the other way around:

    for i in (
        select facet_name,
               facet_value
          from my_stored_facets
         where stored_view_name = 'View 1'
           and username         = :APP_USER
    ) loop
        apex_util.set_session_state(
            p_name   => i.facet_name,
            p_value  => i.facet_value,
            p_commit => false );
    end loop;
    commit;
    

    which gives you all the building blocks. The rest is up to you and your preferences of UI design; you can …

    • allow one or multiple stored configuration
    • apply this to Faceted Search as well as Smart Filters
    • build UI as you wish, e.g. a modal page, or an inline region.
    • hook up authorization schemes to limit such functionality …