CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 example from 2 tables

Print topic Send  topic

Author Message
libraent

Posts: 11
Posted: 04/03/2005, 12:41 PM

Hello, I just registered the software a week ago. Now its time to learn this thing! LOL

I am looking for a sample, I have a table of contributors, I want to be able for the user to select one and on the right side show their actual donations. They would be in a seperate table, the 2 linked by the contributorID.

This probably exists, just can't find it.


_________________
Thanks,

Shane Taylor
Libra Enterprises
View profile  Send private message
peterr


Posts: 5971
Posted: 04/03/2005, 2:18 PM

I don't recall seeing such example, though possibly only because this is very simple to implement and functionally not different than almost any examples, just the layout is different.
You can create 2 grids next to each other (possibly within a table), then create a link within the 1st grid that links back to the same page with the contributorID value. The 2nd grid should have the Data Source property configured with the Where parameter that contains the contributorID.

If the above instructions are not clear then I recommend that you use the Search and Grid Builder to create a page with the Search field based on contributorID. Then we can go from there.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
libraent

Posts: 11
Posted: 04/07/2005, 4:53 PM

Ok, I have a search form based on table "contributor", used a list box to display donors to select from. this is called s_DonorName

Have a grid under it based on table "donations", using where filter of "s_donorName".

It pulls the donors correctly been when you hit search, nothing shows in the grid. Tryed to follow the example in the task manager tutorial. I"m lost

Help!
_________________
Thanks,

Shane Taylor
Libra Enterprises
View profile  Send private message
Nicole

Posts: 586
Posted: 04/08/2005, 7:24 AM

Hello,
As you know CCS Listbox control properties has Bound Column and Text Column. For Text Column you select a field which is displayed on a live page. Bound Column is a field which value is passed from a form after its submit.
Usually numeric value (e.g. Donor ID) is selected for Bound Column, and text value (e.g. Donor Name) is used as Text Column.
If your donations table stores donor name and not donor ID you need to select donor name field for both Text and Bound Column properties of a listbox on a search form. In this case you can search on donor name.
But if donations table stores donor id then select donor id as Bound Column of a listbox.

In both cases you can use Grid Builder to create search and target grid forms. In this case all search parameters are configured automatically.

You can refer to Task Management tutorial which describes how to configure search parameters
http://docs.codecharge.com/studio/html/QuickStart/Creat...reProp.html?toc
http://docs.codecharge.com/studio/html/QuickStart/Creat...hParam.html?toc

_________________
Regards,
Nicole
View profile  Send private message
libraent

Posts: 11
Posted: 04/10/2005, 3:06 PM

Ok, I think I got this figured out.

Now I added a "Add new record" link on the page which directs the user to Donation_maint.ccp and passes the parameter for "donationid". I want that value to match up and display the approrriate DonorName in the Donation_maint.ccp form. Is this possible?

I might as well ask now, cause I know its what I want to do, after they input their new donation and click on submit, I'd like them to be redirected to the donmaint.ccp page with the donorname and search parameters passed so that it shows them all the donations including the record they just added.

Thanks, you folks have been great!
_________________
Thanks,

Shane Taylor
Libra Enterprises
View profile  Send private message
Nicole

Posts: 586
Posted: 04/11/2005, 1:24 AM

I suppose that donor name is now stored in a different table than used as form’s data source. To display text data stored in a different table in a Label control you can join that table and table that is currently used as form’s data source. Use Visual Query Builder to do it. CCS help article http://docs.codecharge.com/studio/html/UserGuide/Forms/FormDataSource.html
should be helpful in it.

_________________
Regards,
Nicole
View profile  Send private message
libraent

Posts: 11
Posted: 04/12/2005, 5:01 PM

Thanks Nicole! You are being so helpful. I have another topic, but I'll just post a new one. hehehehe

Thanks, progressing slowloy (but learning)

_________________
Thanks,

Shane Taylor
Libra Enterprises
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.