Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Sep 18, 1998



Application Security Testing: An Integral Part of DevOps

Problem with Filter function and char()

I want to filter out data from a datawindow during runtime. I have a sle-field in which the user enters a search string (for example, "SM"). This should be used to filter one column in the datawindow, in this case the Name-column. Since the user entered "SM," the program should list:
and so on--all names beginning with "SM." I tried to use following SetFilter string:

dw_search.SetFilter("left(name, '"+char
(ll_Filter_Length)+"') = '"+ sle_search.Text+"'")
But that doesn't work. If I change '"+char(ll_Filter_Length)+"' to 3 or another digit, it works, but since I want the search function to be flexible (that is, the user can enter different long search words), this isn't any good.

You need to use the String function instead of the char function.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date