1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Trying to write query connected to sort browser

Discussão em 'StackOverflow' iniciado por fdantas, Março 17, 2019.

  1. fdantas

    fdantas Administrator Moderador

    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...

Compartilhe esta Página