uf_Find(String as_FindExpression, Long al_StartRow, Long al_EndRow, dwBuffer ae_SearchBuffer) Long ll_row, ll_NumRows, ll_RetValue DataStore lds_Buffer String ls_Filter IF ae_SearchBuffer = Primary! THEN // Normal search ll_RetValue = This.Find(as_FindExpression, al_StartRow, al_EndRow) ELSE // Create datastore to temporarily hold the data lds_Buffer = CREATE DataStore lds_Buffer.DataObject = This.DataObject IF ae_SearchBuffer = Filter! THEN ll_NumRows = This.FilteredCount() ELSE ll_NumRows = This.DeletedCount() END IF // Copy data to temporary datastore This.RowsCopy(1, ll_NumRows, ae_SearchBuffer, lds_Buffer, 1, Primary!) // Search for it ll_RetValue = lds_Buffer.Find(as_FindExpression, al_StartRow, al_EndRow) DESTROY lds_Buffer END IF Return ll_RetValue
Over the years of being a applications developer ( Delphi, Powerbuilder, VB, Agile Outsystems..etc). I have learned many things and I may need to refer to them in the future. Some of the tips may not be relevant with the later versions of the software. I am still in the process of transferring all my notes.
Friday, April 27, 2012
How can I get the Find() function to to search anything other than the Primary! buffer?
Create a function in your ancestor DataWindow / DataStore UserObject (pfe_dw/pfe_ds or u_dw/u_ds in PFC):
Labels:
Powerbuilder
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment