No announcement yet.

SQL error when calling a form from a filtered grid

  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL error when calling a form from a filtered grid

    Hi Scriptcase happy users
    I guess I am missing something... so asking for your advise :

    1- I have a grid with some colomns, some of them are issued from inner join (say I want the name of a town instead of its postal code)

    2- I have a link which displays a detailed form of a row of the above grid should I click on the magnifier icon of a row.
    This link keeps the where clause. till now its ok

    3- Using the filter of the grid, I select for example only the towns which have some lommon letters

    4- Since the link kept the where clause, I want to navigate on the form amongst the selected rows of the grid

    But I get an SQL arror when clicling on the magnifier of a row in the grid when it is filtered (unknown table.column of the SQL inner join of above grid

    I hope the description is clear.. In fact, this is very usefull : I want to select from a grid only some rows and then walk through their associated form.....

    Gilles Bonnet

  • #2
    Form will open the clicked row without any filtering there. If you want to navigate in this form between records filtered on grid, you have to pass the filter too to the form as a param, and use it there. You can use sc_where_filter macro to get the filter:

    Professional Scriptcase Services
    Some Customers opinions


    • #3
      Thanks for you reply Giu.
      I tried to pass the filer the way you told me but the result is the same than my previous test (keep the WHERE clause in the application link of the grid) ; I get an SQL error about unknown table.field

      I looked a bit more deeper and I now believe that my request (navigate amongst a filtered list) is not possible since the filtered text column in the grid comes from a join (I display a NAME instead of the ID). Passed Filter cannot be applied to a form for navigation when it comes from grid fields obtained via JOIN.

      So I shall explain to my customer (and I dont worry about) that the best way is to use the back button of the form to go back to the filtered grid and select the next row .

      Topic closed

      Best Regards

      Gilles BONNET