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 -> PHP

 Drop Down Default

Print topic Send  topic

Author Message
byrum

Posts: 1
Posted: 03/15/2004, 8:40 AM

OK, I just might be missing something, but how can I set a drop down box to pick the value that is already assigned to the record when the fiend is displayed. Instead of saying Select Value.

Thanks
Dave
View profile  Send private message
peterr


Posts: 5971
Posted: 03/15/2004, 12:20 PM

This is automatic.
For example at http://examples.codecharge.com/ExamplePack/OrderEntry/O....php?order_id=2 you can see that the Customer is already selected.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
DonB
Posted: 03/15/2004, 1:06 PM

If you have a value for the field (in the database record), but you see
Select Value, it might be that the source for values that fills the dropdown
list does not contain the particular value for that record. That is, if the
listbox allows 1,2,3,5,6 and you had 4 in the table, then it would display
Select Value.

Perhaps that's what is happening?

--
DonB

http://www.gotodon.com/ccbth


"byrum" <byrum@forum.codecharge> wrote in message
news:54055dc7321bb3@news.codecharge.com...
> OK, I just might be missing something, but how can I set a drop down box
to pick the value that is already assigned to the record when the fiend is
displayed. Instead of saying Select Value.
>
> Thanks
> Dave
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Aaron


Posts: 145
Posted: 03/16/2004, 4:15 AM

Yea, I'm having the same problem.

I have a table with individual names, a table with their typeID (are they from Company A, B, C, etc), table with address, etc.

I have a search box for the individual as well. You can search by Last_name, First_name and TypeID. The TypeID should tell it which company to search by. Like, J. Smith in Company A. That works fine and displays the results like that too. But in clicking on a name to add/edit them, I get to the add/edit form and ADD is the only button showing (again... was talked about in a previous post here and I fixed it, but after adding this drop down, cannot get it working again) and the default value for the dropdown is Select a Value.

I think byrum and I are in the same boat... just not sure which way to paddle.

I have a screen cap of the parameters I can post if that would help, but the page is sending individual.indID (key for the table), individual.first, individual.last, and individual.indTypeID. All those values are being (or supposed to be) passed to the grid. The reason for individual. is that i've got 3 tables that i'm pulling data from. Individual, address (to associate the address of that individual) and indType which is basically a table that holds the data for what company they work for. IE: if they have an indTypeID of 2, then they work for Company X. If they have an indTypeID of 3, they work for Company R.

Thanks.

Aaron
View profile  Send private message
Aaron


Posts: 145
Posted: 03/17/2004, 5:52 AM

Here is a screen cap. of what I'm talking about. Using this, all I get on the Add/Update page is the ADD button, not the update.. though the information comes into the designated fields as it should.

Aaron

View profile  Send private message
peterr


Posts: 5971
Posted: 03/17/2004, 12:35 PM

Sorry but your screenshot is not related to the Record form (Add/Upadate page). And I mean that I really cannot get any clues from it.
What is clear though is that your Record form cannot find the record using the parameters of your link.
The best way to debug this problem is if you provide here the exact URL that is being executed after you click on the link. This is the URL that you see when you arrive at the Record page.
The screenshot of the DataSource of your Record could also help.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Aaron


Posts: 145
Posted: 03/17/2004, 3:04 PM

Right, sorry. The link has everything except the indID= is blank; however, in the list under href source on the grid, it has that as being the first thing in the list it should send.

http://192.168.100.137/aaron/individual_maint.php?  
indID=&prefix=Ms.&first=F_Name&middle1=M_name  
&last=L_name&suffix=&title=  
&nickname=First+Entry  
&fullName=F_Name+M_name+L_name  
&indTypeName=CompanyA  
&PHPSESSID=ad3afe49d79485881bf55328813f8689

First image, what is being sent with the href-source.



Second image, what the data source shows on the add/update page.




I'm real new to this, so I appologize if some of this seems simple or I'm missing something simple. I hope it can help someone else though.

Aaron
View profile  Send private message
peterr


Posts: 5971
Posted: 03/17/2004, 3:32 PM

OK. Everything looks good so far and the only potential problem may be with the field names returned by the grid query (since you're using joined tables) or the data itself.
Please check how your ink's indID parameter is setup (
http://www.digitalderm.com/temp/href_source.jpg). Are you able to select specific database field (indID) in there?

Also, I would remove all the other parameters from your link (Gres Soruce) as indID is the only one you need.

Finally, I would review the data and even run your grid query directly in MySQL to see if it returns records with the correct indID.

Though I also think that this case could be better handled by our support if you could provide them with your project (sample page) to check all the settings.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Aaron


Posts: 145
Posted: 03/18/2004, 4:58 AM

Quote peterr:
Are you able to select specific database field (indID) in there?

I'm not sure I understand what you are refering to here. In the href source? If so, I can't pick a data field there.
Quote :

Also, I would remove all the other parameters from your link (Gres Soruce) as indID is the only one you need.

This I just plain don't follow. Which area should I remove everything except indID?


Quote :
Finally, I would review the data and even run your grid query directly in MySQL to see if it returns records with the correct indID.
So far, with other projects I've had to setup with this (with each new project I start, I'm adding more functionality to the site (or at least attempting to)) I have managed to figure out how to get it to work. But with this one with 3 tables being joined, I can't get indID to follow through.

It is retrieving the data that it should. The problem with this one is it's not sending the indID back to the add/edit grid. In the link, I took the name out of the link before i posted it, to protect the persons privacy to some extent. It's sending everything, except the indID.

Thanks.

Aaron
View profile  Send private message
peterr


Posts: 5971
Posted: 03/18/2004, 11:54 AM

Yes, I was referring to your screeshot http://www.digitalderm.com/temp/href_source.jpg . You must open up the indID parameter and select the database field that you want to transfer to the next page. There is no other way to make this work and this is all you need.
And you should remove everything except indID from the same screen that you showed us: http://www.digitalderm.com/temp/href_source.jpg
All you need is indID with the correct databaswe field selected.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 03/18/2004, 12:01 PM

BTW Aaron, your problem is completely different from the original topic described here by byrum...
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 03/18/2004, 12:29 PM

Aaron,
Below is the screenshot with exactly what you need.
Please only make sure that you select "indID" or equivalent (alias) field in "Parameter source" area. Please do not type it manually.


200403181230360.Aaron.gif
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Aaron


Posts: 145
Posted: 03/18/2004, 6:27 PM

I actually have a drop down for a selection on which company the person works for that does not keep once it is sent to the other screen; that's why I posted here as well as it seemed to me at the time that was part of my problem.

I'll give these a shot and see what I can do. Thanks for all the quick replies. I hope I can get this figured out soon or it's going to drive me up the wall!! :*)
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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