Solved

How to filte table by string length?

Posted on 2000-03-12
2
145 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 129
Can Viruses spread while transferring files via FTP protocol to unshared NAS drives ? 6 95
QRReport  TQrmemo vertical stretching 1 45
Magic Software info 18 130
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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