SEARCH FORM WITH DYNAMICALLY OPERATORS FUNCTIONS [message #417919] |
Wed, 12 August 2009 02:02  |
sharjeelshafqat
Messages: 33 Registered: August 2009 Location: Pakistan
|
Member |

|
|
hi,
I am working on forms 10g.
I am creating a search form.
desription of search form is
attached in attachment
i want to perform a query which also get the operator value dynamically from the list.(LIST FIELD NAME IS :MAIN.EMPNO_OP)
i want to use that value in this query
SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO FROM EMP_REG WHERE (EMPNO = :MAIN.EMPNO OR :MAIN.EMPNO IS NULL)
LIKE
SELECT EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
FROM
EMP_REG
WHERE (EMPNO||chr(10)||:MAIN.EMPNO_OP||CHR(10)||:MAIN.EMPNO OR :MAIN.EMPNO IS NULL)
-
Attachment: search.JPG
(Size: 55.58KB, Downloaded 640 times)
|
|
|
|
Re: SEARCH FORM WITH DYNAMICALLY OPERATORS FUNCTIONS [message #418072 is a reply to message #417919] |
Wed, 12 August 2009 20:42  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Your request is standard behaviour for Oracle Forms.
I suggest you do one of the demonstration forms to see how a form is built. Search this forum for 'tutorial'.
Define a control block on which you place the first three fields and their operators, then create a block based on the table 'emp_reg', and under the button (which lives on the control block) you have a 'When-Button-Pressed' trigger which takes the information entered and places it in the 'deafult_where' on the second block. You then do a 'go_block' and an 'execute_query' to display the records requested.
David
|
|
|