This topic is locked

Dependent Lookup Autofill

2/24/2009 1:00:19 AM
ASPRunnerPro General questions
A
agruspe author

I am building an orders database wherein a requirement is to fill-in 4 fields at the same time using dependent drop-down lookup. Below are the table fields list:
Main Table

Client

Make

Model

Option1

Option2

Option3

Option4
Lookup1

Make
Lookup2

Make

Model

Option1

Option2

Option3

Option4
Need to auto-fill the OptionX fields on Main Table from the values on Lookup2 table. Lookup2 table is an Item Assembly Matrix.
Is it possible to do this using ASP Runner 6? Please advise...
Thanks in advance..

Sergey Kornilov admin 2/24/2009

Arnel,
you can have multiple dependent dropdowns linked to the same master control. Is that what you looking for?

A
agruspe author 2/24/2009

Hi Sergey,
Actually, I am using only one dependent lookup that should/will fill-in 4 fields. MAKE is a drop-down lookup from Lookup1 while MODEL is the dependent drop-down lookup from Lookup2.
Main Table

Client

Make -> dropdown based on table Lookup1

Model -> dependent dropdown based on table Lookup2

Option1 \

Option2 | These fields should be auto-filled from values on table

Option3 | Lookup2 depending on Model

Option4 /
In my scenario, the MODEL field is the dependent lookup. When a user selects a model, it should automatically fill the OPTION fields of the main table with the value from OPTION fields of Lookup2 table. Table Lookup2 is also the price table.
My client is a custom-builder of trailers (various models) <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=38205&image=1&table=forumreplies' class='bbc_emoticon' alt=':ph34r:' /> and requires a variety of customer options such as brake, lights, etc. Different pricing for every model depending on the options. I am using the CARS template as inspiration to suit the requirements.
Thanks,

Arnel
ps.

I forgot to include the PRICE field which needs to be update and its value is also from Lookup2 table.

A
agruspe author 5/5/2009

Resolved the problem already.
Below is the demo link of a sample how it works.
Demo account to show how dependent-dropdown with autofill to other fields.

A
agruspe author 5/6/2009

I received a PM from Newbe how this was achieved. For those who would want to know how this is achieved, below is the screen shot of the properties of Field1 of the demo


The link field Other1 is the value field that you want to pass into the main table but this is dependent on Subs category control.
You have to select Edit box with AJAX popup to "fake" the user that this is a field and not a drop-down.
Take note that the contents of Other1 field "grabbed" can be edited by the user. Should you wish that the user cannot edit this, search within this forum how to disable the field edits (Jane and I have topics already with this).
Should you find this helpful, a simple thanks added below this topic (and thanks to the developer of ASP Runner) is highly appreciated.
Jane/Sergey,

Can we make a copy of this thread to the TIPS AND TRICK section.
Thanks,

Arnel

Sergey Kornilov admin 5/6/2009

Arnel,
thanks for sharing!
I grab all required info from this thread and post it to Tips and tricks. In fact you can do this too and get all the kudos.