How to filte table by string length?

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
kelvinyuAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
simonetConnect With a Mentor Commented:
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
 
kelvinyuAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.