[Stackoverflow] [Progress OpenEdge ABL] Trying to write query connected to sort browser

Status
Not open for further replies.
E

Ellen

Guest
I'm a beginner to Progress and to programming, would be really greatful for some help.

Trying to write a query connected to a browser. In my window there is also a radioset (that sorts the browser, for example by name or age) and a fillin (if anything is written there and "ok" is pushed then only the posts where the surname begins with whatever is written are to be displayed in the browser.

The radioset has a default-value, on value-chagned the browser is opened again.

I've tried to write my query like the following and the sorting by the radioset works, but not the fillin (Showeing the error message that it doesn't understand the query):

DEFINE INPUT PARAMETER pfiSurname AS CHARACTER NO-UNDO. DEFINE VARIABLE cQuery AS CHARACTER NO-UNDO. DEFINE VARIABLE hQueryHandle AS HANDLE NO-UNDO. &SCOPED-DEFINE BROWSER brMembers

DO WITH FRAME {&FRAME-NAME}: ASSIGN rsSort.

IF fiSurname = '' THEN ASSIGN cQuery = 'FOR EACH Member NO-LOCK by member.' + rsSort. ELSE ASSIGN cQuery = 'FOR EACH member NO-LOCK WHERE member.surname BEGINS' + fiSurname + 'BY member.' + rsSort.

hQueryHandle = {&BROWSER}:QUERY. hQueryHandle:QUERY-PREPARE(cQuery). hQueryHandle:QUERY-OPEN().

END. END PROCEDURE.

Continue reading...
 
Status
Not open for further replies.
Top