How does the automatically generated search input work?

How does the automatically generated search input work?

  

Hi,


When I scaffold an entity, I get the automatically generated search input.  It look like it automatically defaults to the 1st few columns in the entity.  Couple questions:

(1) Can I modify it's default behavior (example - change the columns defaulted in the search)?

(2) Are the search arguments ANDed, ORer, etc.


This is probably in a doc somewhere, but I could not find.

Thank you.

Hi Larry,


Check the actions that are created on the tree below your screen.

One of them (most likely the Preparation) will have a Aggregate and you can modify it's filters as you want.


Regards,
João Rosado

Hi Larry,

From the top of my head...

Yes, you can change the columns. You can change the filter in the aggregate in preparation. The filter uses "or", as the fields used are text fields and it is used the following form:

Field like "%" + session.search + "%" or anotherField like "%" + session.search + "%" or ...

This means that if the search string is not empty, any field in the filter that matches the search will enter in the result, and if search is empty, the filter will always return true.

Hope this helps you.

Cheers

Eduardo Jauch

Larry Mills wrote:

Hi,


When I scaffold an entity, I get the automatically generated search input.  It look like it automatically defaults to the 1st few columns in the entity.  Couple questions:

(1) Can I modify it's default behavior (example - change the columns defaulted in the search)?

(2) Are the search arguments ANDed, ORer, etc.


This is probably in a doc somewhere, but I could not find.

Thank you.

Hi Larry, 

Yes, you can modify the default search criteria by adding extra column in search condition by putting proper And/Or depend on your criteria.

If you have gone through with training videos and exercise, I don't think any document require to do this.

Anyways, you can check this one https://www.outsystems.com/learn/lesson/1028/aggregate-data-for-a-dashboard/

Sachin