No announcement yet.

How to pass a value from a form to a grid to execute a sql query

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to pass a value from a form to a grid to execute a sql query

    I have a database that I need to query to obtain a search result based on a field from a form. My project is a building door access system that we use where we monitor many doors at multiple buildings. I want to create a web front end for users to be able to select a particular building from a drop down list and also use the calendar picker to select a start date and end date. I then want to pass these three variables to a sql query to display the results in a grid. There are three tables in the database that I need to query. I already created a form with a dropdown select field for the building location that I used a sql query to populate. I also created 2 calendar fields on the form for a start date and end date. I have a sql query to works to get the data from the tables. My question is: what is the best way to accomplish this? I'm a novice with Scriptcase so I appreciate any guidance anyone can offer.

  • #2
    If you have a grid then you can define several search solutions to do selects on your data. If you want to start from a form you can start with a search form. There are samples in your samples directory, just install. If you want to call a grid from a scriptcase form you need to create a link of type application. Pass the query information in a global variable and assign this to the query in the grid. I.e. where myfiels='[glob_myquery]'
    It depends on your situation really what the best option is.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /