Filter RecordList

Stable Version 1.1.0 (O9.1)
Also available for 7
Published on 10 August 2016 by 
Created on 05 December 2013
Details
Allows you to filter a RecordList Object by attribute(s) name.
Read More

This component allows you to filter RecordList objects, on the specfied columns by the specified value.
It also supports operators to enable a little more complexity on the searches.

Text Types support: <>
Int&Datetime Types support: <, <=, >, >= and <>


Examples on how to use these are provided in the method's description.


-----------------------------------------------------------------------------------

Inputs

-----------------------------------------------------------------------------------

RecordList (Object): The RecordList Object to filter from. Use the Built-In ToObject() function to convert your RecordList.

Attribute (String): The column name to filter from. This is the structure attribute name you wish to filter by. Multiple attribute names are supported, just separate them with commas. Eg. Name, Description, Comment

FieldValue (String): The search value. Supports operators.


-----------------------------------------------------------------------------------
Operator Specifications
-----------------------------------------------------------------------------------
Default Behavior (simple string value)
Verifies if this value is contained inside the attribute value.
Equivalent to SQL's LIKE operator.
 
With Operators
Supported Operators
String: <> (Equivalent to SQL's NOT LIKE)
DateTime, Int: <, <=, >, >=, <>
 
Example, just prepend the operator, and a space before the filter value.
 
Eg. 
Filter value "<= 1987-01-18" will show all dates previous to Jan. 18th 1987.

-----------------------------------------------------------------------------------
Implementation Sugestions
-----------------------------------------------------------------------------------
If you need to use this, you probably have a larger list that contains all the existing data. So you shouldn't need to call the method returning all that data ever again.
Always have in mind that the method provided by the extension will operate directly on the provided Object (reference).

On a typical scenario you should have something like:
  1. A base recordlist that is never modified.
  2. A RecordList variable of the same type that will be populated by a ListDuplicate() action. This will avoid ever touching the original dataset
  3. A filter action on the Local variable that is a duplicate of the original dataset.

Eg. 


-----------------------------------------------------------------------------------
Final Thoughts
-----------------------------------------------------------------------------------

The functionality provided by this extension will enable you to filter Structure RecordLists, that almost always require custom logic to do so. Eg. Recordlists returned by WebServices without search input parameters.

NOTICE:
Searching these lists, requires iterating through all its records, as a result, performance suffers on long lists.
Do not use such components lightly, this should be used only when no other options are avaliable and you know the lists aren't very long.
In my case, I had to develop this because our application is running heavily on structures returned by legacy 4GL Java WebServices that can't be easily changed to accomodate search parameters.


Notice: This component takes advantage of private and undocumented Platform APIs, which can change without notice. As a result, this component may unexpectedly break as the Platform is upgraded. We advise proper testing to ensure that your applications continue to work as expected when upgrading/patching the Platform.


What’s new (1.1.0)

Now working with .net in platform version version 9.1.401  

Thanks to Fantato (OP)

Reviews (1)
19 Feb
in version 1.1.0
not true didnt work
Category
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from António Chinita who created this component.
Dependencies
Filter RecordList has no dependencies.
Requirements
Platform:
9.1.0.6
Database:
All
Stack:
.NET
Component Consumers
No consumers yet.
Weekly Downloads