Announcement

Collapse
No announcement yet.

Search of Grid not working as expected

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search of Grid not working as expected

    I have a grid app that starts in search mode.

    The search was originally based only on 4 fields in the database of the grid. It worked fine. There is however a need to limit the records based on a WHERE condition to another table. So I created 3 other fields in the search (i.e. fields x1,x2,x3 which are not in the database of the grid.)

    In onValidate of the search, I build a where statement into a global variable [globwhere] = " WHERE id IN (SELECT id FROM 2ndtable WHERE field1 = {x1},field2={x2},field3={x3})";

    In the SQL of the grid app I place [globwhere] after the "FROM 1sttable" portion.

    When I run the grid app now, no records get returned under any condition, even when I do not select any search criteria (before this, not selecting criteria listed all records).

    It's only if I comment out everything in onValidate that this works again; but of course then the search does not work.

    How can I troubleshoot/ solve this?
Working...
X