Announcement

Collapse
No announcement yet.

Populate select field at run time

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

  • Populate select field at run time

    Hi

    Could anyone let me know if there is a way to change the SQL in a select field at run time ... ie clear the existing list and replace with another (different tables in database)

    Cheers
    Will
    Will
    www.willhogarth.com

  • #2
    I think you can change it using a variable global: [my_sql] = "select field1, field2, ...".

    Comment


    • #3
      Cheers

      I've actual done what I wanted to do by using a series of dynamic view s at the database side
      Will
      www.willhogarth.com

      Comment


      • #4
        Originally posted by william@victus-vsuk.co.uk View Post
        Cheers

        I've actual done what I wanted to do by using a series of dynamic view s at the database side
        ..... sorry?

        can you explain this?
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          I have a payments form that i am going to use from different points within the systems. This form if for payments out and payments in and will insert data into different tables depending on where it is called from and weather it is incoming or outgoing. each of these payment areas has its own config set up.

          So to get round my problem of changing the config selection SQL at run time I created a number of views based on Union selects from the difference config setting and added a couple of static fields for config reason - I then filtered my select statements when the form was called and further filtered when required using ajax.

          Insets into the required tables were then handled via code
          Will
          www.willhogarth.com

          Comment

          Working...
          X