Solved

How to filte table by string length?

Posted on 2000-03-12
2
148 Views
Last Modified: 2010-04-04
I want to filte a table by it's name field, the Name lenght must less than 5 character, How to set the Filter String at Table component?

Thanks
Kelvin
0
Comment
Question by:kelvinyu
2 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 50 total points
ID: 2610743
Do the following:

- Set the Table's Filtered property to TRUE;

- Add this code to the OnFilter event of the TTable component:

Accept := length(trim(Table1.FieldByName('Name').asstring)) < 5;

Yours,

Alex
0
 

Author Comment

by:kelvinyu
ID: 2610756
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet Explorer View Settings Question 15 123
tidtcpserver connection lost handle 2 110
CheckListBox usage 3 81
Delphi Firemonkey send email on Android 1 43
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question