No announcement yet.

Showing Database values in a form by selecting ComboBox value

  • Filter
  • Time
  • Show
Clear All
new posts

  • Showing Database values in a form by selecting ComboBox value

    Hello Guys,
    I have a table with the name,address,city,phone and mail of clients. I want to make a form application which first field will be an ajax auto complete field with tha name of the client and when i choose him to show me all the other data as address, city,phone etc to the next fields. I did it with sc_concat in one field but it is a very big row with data, so it is better to be different fields. I read some posts and saw that it is better choice to use select field for the name and using ajax to reload but it didn't works. What am i doing wrong? May i have your help?

    Thank you very much!
    Last edited by robertotio; 12-17-2013, 09:05 PM.

  • #2
    Create a new field (customer_choice) with data type "select". In the general settings of that field use a variable name (e.g. [var_customerid]). Create a lookup for that field. You can now select your adress/customer.

    Now create a Ajax event field customer_choice, type onChange with this code:

    // [var_customerid] = your (global) variable in general settings
    // {customer_choice} = your (select) field
    [var_customerid] = {customer_choice};
    // restart your form after customer select
    At form settings / sql you must have a where-condition like:

    // customerid = key field in your table
    // [var_customerid] = your (global) variable in general settings
    customerid = '[var_customerid]'
    That's all ...
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)


    • #3
      Hmm... It is not clear form me. How to create button after field Customer e.g. "[Choose Customer]", that open search for this Customer and "[Select]" one, and propagate all "Customer" information like City, Address, Phone etc to the form ?


      • #4
        I think you want to use a link (check the menu on the left under Links). RHS already described it fully.