This discussion is archived
1 Reply Latest reply: Dec 16, 2012 2:41 AM by Subramanian Meyyappan RSS

af:query - change where clause

974835 Explorer
Currently Being Moderated
Hi,

In my form I have af:query based on a view.
also I have a checkbox that indicates to add or remove sql statements from the 'where clause' of the view.

for example:
my view query is "select * from employees where employees.kod_emp>0"
I need that in case the checkbox is checked the view will look like this:
"select * from employees where employees.kod_emp>0 *and employees.kod_dept = :dept_id*"
and when the checkbox is unchecked the view will return to the original query.

how could I implement it using the same af:query component?

Edited by: 971832 on 02:38 10/12/2012

Edited by: 971832 on 02:39 10/12/2012

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points