Search code examples
oracle-apexfaceted-search

faceted search: filter 2 columns with 1 facet


<table>
<th>curr_0</th><th>amount_0</th><th>curr_1</th><th>amount_1</th>
<tr><td style="color:salmon;">eur</td><td>100</td><td>usd</td><td>120</td></tr>
<tr><td>gbp</td><td>70</td><td style="color:salmon;">eur</td><td>40</td></tr>
<tr><td>gbp</td><td>200</td><td>usd</td><td>10</td></tr>
<tr><td>usd</td><td>10</td><td style="color:salmon;">eur</td><td>20</td></tr>
</table>

Is it possible to filter euro currencies by using one (e.g. P1_CURR) facet, on both columns at once?


Solution

  • Not sure if it's the correct way of using Search item, but it helped me providing this feature on my page.

    Normally, if I'm using checkbox item as facet, it'd filter out the data based on one specific column.

    Instead, I created a page item of type cbx, provided a query for populating selections.

    enter image description here

    Above I have 2 cbx, here is what I've done

    Then I created a facet of type Search. That Search item works on row and multiple columns can be defined as source.

    I typed my 2 currency columns here, set Input Field as External Page Item, and pointed out my CBX Page Item as External Page Item

    enter image description here

    perhaps it helps someone someday.