Multi-Term Table Filter

  

Does OutSystems offer a functionality that allows a user to filter across multiple attributes using a single search box ? The example would be having a table with Region, Color, Language, Type. I'd like to provide the user with a search input that allows them to type in any combination of those values to filter the table now.

So a user could type S.America Yellow Spanish and the table filters results down to records that match all entered values. It would be a functionality similar to a multi-term Jquery table filter which can be seen in action here.https://ardalis.com/multi-term-jquery-table-filter


Hi Christopher,

I was curious of what other answers would be. thats why I didnt answer it right away. Anyway my solution is in attachment. But I would love to see others solution. Btw I'm using a extension I created to be able to have values between " ". you can find it on forge.

Regards,

Marcelo

Hello Christopher,

As you can see, there is no "direct" way of doing that.
You can use an approach like Marcelo is using, that is to use an SQL and pass an inline SQL expression to do the where, but it will not work with aggregates (that should be used whenever possible).

I would avoid it, though. 

In order to make your interface more clear and intuitive for the user, I would use different inputs for each column you wants to filter. It's the standard approach. And standard is good, because users are used to them and fell more confortable. 

And this approach would let you use aggregates. 

Cheers.

Marcelo Ferreira wrote:

Hi Christopher,

I was curious of what other answers would be. thats why I didnt answer it right away. Anyway my solution is in attachment. But I would love to see others solution. Btw I'm using a extension I created to be able to have values between " ". you can find it on forge.

Regards,

Marcelo

Thanks Marcelo, could you point me to the extension you are referring to ?


Hi Christopher,

the extension is this one https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=2524

Regards,

Marcelo

Eduardo Jauch wrote:

Hello Christopher,

As you can see, there is no "direct" way of doing that.
You can use an approach like Marcelo is using, that is to use an SQL and pass an inline SQL expression to do the where, but it will not work with aggregates (that should be used whenever possible).

I would avoid it, though. 

In order to make your interface more clear and intuitive for the user, I would use different inputs for each column you wants to filter. It's the standard approach. And standard is good, because users are used to them and fell more confortable. 

And this approach would let you use aggregates. 

Cheers.

Thanks Eduardo. The challenge is the present tool has a convenient functionality that allows end users to search based on labels. So basically each record has a label field where all the attributes are dumped. So in my example, a user could have a label of S.America Spanish Yellow all in the label field. This makes it easy to search. However, when you need to extract a report and post process in say excel, it's had to do that.

With the app I'm working on, I am thinking an option might be dumping the attributes from the needed fields into a "label" field where the query can run against that single field.


Marcelo Ferreira wrote:

Hi Christopher,

the extension is this one https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=2524

Regards,

Marcelo

Hi Marcelo,

I tried using the example you provided to test on my app. For some reason, I am getting the error below when I try loading the page. The page gives me an error "Internal ErrorAn internal error occurred and was logged.
Please try again later or contact the administration team.

Sorry for any inconvenience."


Any idea what could be causing this ?


Thanks


[1] Error executing query.
   at ssServiceDash.Flows.FlowMainFlow.ScrnReferrals.FuncssPreparation.QuerySQL1(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstSearchKeyword)
   at ssServiceDash.Flows.FlowMainFlow.ScrnReferrals.Preparation(HeContext heContext)
   at ssServiceDash.Flows.FlowMainFlow.ScrnReferrals.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[2] Error in advanced query SQL1 in Preparation in Referrals in MainFlow in ServiceDash (SELECT {Referral}.[Region],{Referral}.[SubRegion],{Referral}.[ProgramCode]  from {Referral}  where @SearchKeyword): An expression of non-boolean type specified in a context where a condition is expected, near '@qpstSearchKeyword'.


Hi Christopher,

You forgot to set the Expand Inline to YES.

Regards,

Marcelo