MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

Single Line Edit - Wildcard searching in PowerBuilder Datawindow

Published on 03 September 16
2129
0
1
// Suppose we need to filter the datawindow data based on the random characters which we are entering in a text box
// Like Wild card searching
// Here I am using a single line edit . Based on the single line edit data we need to filter the data while entering data in the textbox.
// The search/filter should be case insensitive

1. Associate the below code to Powerbuilder singleline edit's - pbm_enchange event id and save it as some event ue_search()
2. Thats it. It is like item changing event of a datawindow column
// object :: sle_1
// event ID:: pbm_enchange
// event name:: as your wish, here ue_search()

string ls_sc

if trim(this.text)='' then
dw_1.setfilter('')
dw_1.filter()
else
ls_sc="lower(item_name) like '%"+lower(this.text)+"%'"
// In the above line you can convert the column and data to Upper also
dw_1.setfilter(ls_sc)
dw_1.filter()
end if
Single Line Edit - Wildcard searching in PowerBuilder Datawindow - Image 1
// Suppose we need to filter the datawindow data based on the random characters which we are entering in a text box// Like Wild card searching

// Here I am using a single line edit . Based on the single line edit data we need to filter the data while entering data in the textbox.

// The search/filter should be case insensitive

1. Associate the below code to Powerbuilder singleline edit's - pbm_enchange event id and save it as some event ue_search()

2. Thats it. It is like item changing event of a datawindow column

// object :: sle_1

// event ID:: pbm_enchange

// event name:: as your wish, here ue_search()

string ls_sc

if trim(this.text)='' then

dw_1.setfilter('')

dw_1.filter()

else

ls_sc="lower(item_name) like '%"+lower(this.text)+"%'"

// In the above line you can convert the column and data to Upper also

dw_1.setfilter(ls_sc)

dw_1.filter()

end if

Single Line Edit - Wildcard searching in PowerBuilder Datawindow - Image 1

This blog is listed under Development & Implementations and Data & Information Management Community

Related Posts:
Post a Comment

Please notify me the replies via email.

Important:
  • We hope the conversations that take place on MyTechLogy.com will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
You may also be interested in
 
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top