CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Listbox values based on Form value

Print topic Send  topic

Author Message
splay

Posts: 8
Posted: 01/31/2008, 1:15 AM

Hi Guys,

I have a form with CompanyID ( not avaiable in query string ) on the page, I then want to add a listbox of users for that company on the same page.

Is there an easy way of doing this that I just not seeing?


Thanks

Tony

View profile  Send private message
splay

Posts: 8
Posted: 01/31/2008, 8:39 AM

Pleeease ?? :-/
View profile  Send private message
mrachow


Posts: 509
Posted: 02/01/2008, 1:14 AM

When creating the Data Source of your ListBox you have several options for the type of the parameter you would compare a database column with. For example Session, Form, Expression and more. One of them should meet the form your CompanyID does exist.

Of course there must be a column in your user table you can compare the CompanyID with.
_________________
Best regards,
Michael
View profile  Send private message
splay

Posts: 8
Posted: 02/01/2008, 1:27 AM

Thanks for your response.

When you say Form is it a posted Form value you are talking about or can it be a value thats sittin on the Form beside it?

So for example I have companyID on the form ( not avaiable in Session or Request only in the datasource ) I then have a user dropdown on the form too. I want the user dropdown values to be filtered by the CompanyID.

The way I have worked around it is to have the BeforeBuildSelect of the dropdown to add the Where clause "Where companyId = " & form.companyID.Value

I would have imagined it would be a little easier, like in .Net you can have one datasource on a page reference another one on the page .

Cheers

Tony
View profile  Send private message
mrachow


Posts: 509
Posted: 02/03/2008, 2:49 AM

I'm not quite sure if I understand completely.

You can exactly do what you have done your PHP code using the visual query builder.
Usually the record set database values are bound to a form field and you can refer these form field from another form.
When having an invisible database filed you can bind it to a hidden field and refering this.

The Component Reference Manual just starts with the section Referencing Objects showing all possibilities depending on "where you are".
_________________
Best regards,
Michael
View profile  Send private message

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.

Web Database

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.