CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Form field list based on a choice from prior field

Print topic Send  topic

Author Message
Henryk

Posts: 63
Posted: 02/25/2004, 9:23 AM

I have a data entry form where the first field is supervisor and the second field is tech. Each supervisor has his own techs, so I would like to, based on the supervisor, only list the techs associated with him in the second field. This is in asp connected to a mssql database. The supervisor field is pulled from a table called supervisors that only has 1 field in it, supervisors. The second field pulls from a second table called techlist. This table has 2 fields, techname and supervisor. I do this because if I pull supervisor based on the techlist table, there are duplicates of the supervisor name. I tried to add a parameter for the second listbox, the tech field, where supervisor = {supervisor} but I must be doing it wrong because it is not working. Any help would be greatly appreciated. Thank you!

Henryk
View profile  Send private message
DonB
Posted: 02/25/2004, 12:33 PM

I created an example: http://www.gotodon.com/examples/dependentlistbox.asp.
Source code is available (see details on the page for downloading)

--
DonB

http://www.gotodon.com/ccbth


"Henryk" <Henryk@forum.codecharge> wrote in message
news:2403cd9f93bb7a@news.codecharge.com...
> I have a data entry form where the first field is supervisor and the
second field is tech. Each supervisor has his own techs, so I would like to,
based on the supervisor, only list the techs associated with him in the
second field. This is in asp connected to a mssql database. The supervisor
field is pulled from a table called supervisors that only has 1 field in it,
supervisors. The second field pulls from a second table called techlist.
This table has 2 fields, techname and supervisor. I do this because if I
pull supervisor based on the techlist table, there are duplicates of the
supervisor name. I tried to add a parameter for the second listbox, the tech
field, where supervisor = {supervisor} but I must be doing it wrong because
it is not working. Any help would be greatly appreciated. Thank you!
>
> Henryk
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Don Safar
Posted: 02/25/2004, 3:10 PM

Your link returns a 404 error (The page cannot be found).
"DonB" <~ccbth~@gotodon.com> wrote in message
news:c1j0re$j13$1@news.codecharge.com...
> I created an example:
http://www.gotodon.com/examples/dependentlistbox.asp.
> Source code is available (see details on the page for downloading)
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "Henryk" <Henryk@forum.codecharge> wrote in message
>news:2403cd9f93bb7a@news.codecharge.com...
> > I have a data entry form where the first field is supervisor and the
> second field is tech. Each supervisor has his own techs, so I would like
to,
> based on the supervisor, only list the techs associated with him in the
> second field. This is in asp connected to a mssql database. The supervisor
> field is pulled from a table called supervisors that only has 1 field in
it,
> supervisors. The second field pulls from a second table called techlist.
> This table has 2 fields, techname and supervisor. I do this because if I
> pull supervisor based on the techlist table, there are duplicates of the
> supervisor name. I tried to add a parameter for the second listbox, the
tech
> field, where supervisor = {supervisor} but I must be doing it wrong
because
> it is not working. Any help would be greatly appreciated. Thank you!
> >
> > Henryk
> > ---------------------------------------
> > Sent from YesSoftware forum
> > http://forums.codecharge.com/
> >
>
>

DonB
Posted: 02/25/2004, 3:55 PM

oops - thanks, mistyped it:
http://www.gotodon.com/ccbth/examples/dependentlistbox.asp

--
DonB

http://www.gotodon.com/ccbth


"Don Safar" <donsafar_remove_@hotmail.com> wrote in message
news:c1ja1i$fjt$1@news.codecharge.com...
> Your link returns a 404 error (The page cannot be found).
> "DonB" <~ccbth~@gotodon.com> wrote in message
>news:c1j0re$j13$1@news.codecharge.com...
> > I created an example:
> http://www.gotodon.com/examples/dependentlistbox.asp.
> > Source code is available (see details on the page for downloading)
> >
> > --
> > DonB
> >
> > http://www.gotodon.com/ccbth
> >
> >
> > "Henryk" <Henryk@forum.codecharge> wrote in message
> >news:2403cd9f93bb7a@news.codecharge.com...
> > > I have a data entry form where the first field is supervisor and the
> > second field is tech. Each supervisor has his own techs, so I would like
> to,
> > based on the supervisor, only list the techs associated with him in the
> > second field. This is in asp connected to a mssql database. The
supervisor
> > field is pulled from a table called supervisors that only has 1 field in
> it,
> > supervisors. The second field pulls from a second table called techlist.
> > This table has 2 fields, techname and supervisor. I do this because if I
> > pull supervisor based on the techlist table, there are duplicates of the
> > supervisor name. I tried to add a parameter for the second listbox, the
> tech
> > field, where supervisor = {supervisor} but I must be doing it wrong
> because
> > it is not working. Any help would be greatly appreciated. Thank you!
> > >
> > > Henryk
> > > ---------------------------------------
> > > Sent from YesSoftware forum
> > > http://forums.codecharge.com/
> > >
> >
> >
>
>

skabila
Posted: 02/27/2004, 10:10 PM

I checked your web site and got the code. I am using CCS, with c#.

I understand your concept of putting the cid into the URL. How do you do that with a textbox in a record form?

I am having difficulty in using the data-source of the record form to return data even when I have a cid-sort of textbox with a default value..

In CCS, the client code of submitting a form has a field for parameter. do you use that, and if so what do you enter there? I tried it with {cid} or {recordformnamecid} etc..
thanks
DonB
Posted: 02/28/2004, 5:26 AM

It wouldn't matter what the control was, so long as the first control let's
you input a value that the second control expects as a parameter. If you
dealing with textboxes, this sounds like the standard Search form CCS
implements.

Not sure about your reference to a parameter. I used that in my comments on
my example, but was referring to replacement of ?cid=xyz" each time the form
loads (so you don't end up with "?cid=xyz&cid=xyz&cid=xyz" - where the same
parameters repeatedly gets appended).

--
DonB

http://www.gotodon.com/ccbth


"skabila" <skabila@forum.codecharge> wrote in message
news:2404030c7006bb@news.codecharge.com...
> I checked your web site and got the code. I am using CCS, with c#.
>
> I understand your concept of putting the cid into the URL. How do you do
that with a textbox in a record form?
>
> I am having difficulty in using the data-source of the record form to
return data even when I have a cid-sort of textbox with a default value..
>
> In CCS, the client code of submitting a form has a field for parameter. do
you use that, and if so what do you enter there? I tried it with {cid} or
{recordformnamecid} etc..
> thanks
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.