|
| |
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
Compare multiple variables in a DRr? - 1/3/2002 10:43:41
I have created a database results region that allows a visitor to enter their zip code and view demographic information about that zip code. http://www.carnegiecomm.com/sms/zipcode.asp I have now been asked if I can set this up so that a visitor could enter in up to three different zip codes and then have the table compare the demographic data on each side by side. Is this possible with FP2000 and Access? Susan Jordan Bennett www.shoestringshipyard.com
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Compare multiple variables in a DRr? - 1/4/2002 0:35:47
If you presented the user with a multiple selection box containing zips, you could then use a query "WHERE ZIP IN (::input::)" "input" from a multiple list will look like : 123,122,124,132 etc... and assumes "zip" is numeric and then use formatting to display seperated information to the user. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/8/2002 17:46:15
Spooky, I'm just getting back to this question. Thanks for your response. Here's my dilema. There are 30,000 plus zip codes in the country. I don't think a multiple selection box is an option... even if I break it down by state. I may however be able to do this by county. Is it possible, in the search form, to have visitors click on a state from a drop down box and then have a list of appropriate counties come up? I know this can be done with java script, but I don't know if I can incorporate this idea into the database results set-up. Any thoughts? Susan Jordan Bennett www.shoestringshipyard.com
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Compare multiple variables in a DRr? - 1/8/2002 20:39:32
Hmm - see your problem. Not really anything I can think of, unless you post from page to page. Maybe supply a "Enter how many zips" box and generate a form with x boxes. All of this would be asp though... :( §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/9/2002 9:27:44
Spooky, what if I posted page to page and the first page contained three text boxes in which the respondent typed in their zips. Could I then pass these on in some fashion to accomplish what you suggested earlier? "If you presented the user with a multiple selection box containing zips, you could then use a query "WHERE ZIP IN (::input::)" "input" from a multiple list will look like : 123,122,124,132 etc... and assumes "zip" is numeric" Or am I mixing up possible solutions? Susan Jordan Bennett www.shoestringshipyard.com
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Compare multiple variables in a DRr? - 1/9/2002 20:16:32
Not really, the problem lays in getting the correct input at the end (with commas in the right place) Its another one of theose things, where if you need to thing outside of the box, asp comes in handy :( §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
d00nson
Posts: 142 From: Australia Status: offline
|
RE: Compare multiple variables in a DRr? - 1/10/2002 8:35:52
Hi Susan, Spooky! Just throwing in my 2cents worth. I was just reading Susan's 1st post, since she wanted to enter up to 3 zip codes and display all 3 side by side, can't she just have 3 text boxes in the same form, call the boxes "zip1, zip2, zip3" then submit to a page with a DRW and query with "SELECT * FROM table WHERE (zipcode=::zip1::) OR (zipcode=::zip2::) OR (zipcode=::zip3::) then put the DRW on a diet and hack it to display the data in 3 columns? This would give the compare side by side part that Susan wants. To solve the problem of if she wants to group the zips by country/county etc. and let the customer pick them instead of manually input prior to submitting to the comparison page, I would have 3 DRWs in a table with 3 columns, each column would be identical except for the last box in each column which would be the (zip1, zip2, zip3) I mentioned earlier containing the zipcode to be submitted. Then have multiple dropboxes in each column to progressively filter the results to produce the grouped zip codes. Hope this doesn't confuse matters more
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Compare multiple variables in a DRr? - 1/10/2002 12:03:04
If desperation set in, then yes, thats the next option. I think the problem lays in that the user may want to enter 1 or 20 codes? Thats where, although you can use the DRW, you need to hack it to remove any unfilled text boxes. So, its not pretty, but can be done that way. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/14/2002 14:40:26
Thank you both for your feedback. I'm still working on this task! Since I've got a learning curve here I simplified the issue by trying to compare just two zip codes. I used d00nson's suggestion and came up with the following. http://www.carnegiecomm.com/sms/test/ziptest.asp Now I need to figure out how to "hack" the table so that the results will display side by side with the data from each zip code for each variable side by side? Any advice?
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/15/2002 20:11:47
Well, I'm still at it. Spooky, I was able to recreate your side by side records when including only one variable from the database. However, when I add a second variable as follows: <%If x = 0 then %> <tr> <%end if%> <%x=x+1%> <td><%=FP_FieldVal(fp_rs,"Zip")%> <td><%=FP_FieldVal(fp_rs,"PO")%> <% If x < 4 then %> </td> <%Else x = 0%> </tr> <%end if%> I get this: http://www.carnegiecomm.com/SMS/Test/zip1.asp I played with it a bit thinking that if I could get the code for the variables in columns it would generate the records side by side, but what I ended up with is all the variables for each record displaying vertically. This is the codee I used: <%If x = 0 then %> <tr> <%end if%> <%x=x+1%> <tr><td><%=FP_FieldVal(fp_rs,"Zip")%></td></tr> <tr><td><%=FP_FieldVal(fp_rs,"PO")%></td></tr> <% If x < 4 then %> <%Else x = 0%> <%end if%> THis is what I ended up with: http://www.carnegiecomm.com/SMS/Test/zip2.asp Any advice for rewriting my code to have my zip code records running accross the columns and my variables running down the rows? Thanks! Susan Susan Jordan Bennett www.shoestringshipyard.com
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/16/2002 11:15:06
d00nson, thanks so much for the new thoughts. I'll keep working with it!
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/16/2002 11:51:43
You have NOT led me astray. I'm getting there. Check this out... http://www.carnegiecomm.com/sms/test/zip4.asp Now I just need to fine tune... What I need to figure out now is if I can have only one column of field descriptions rather than one for each zip code presented. Thanks so much for your advice! Susan
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/16/2002 13:53:35
Actually, the URL has changed... http://www.carnegiecomm.com/sms/test/zipcode.asp Any thoughts about how to have only one colum of headers show? Susan
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/16/2002 14:37:22
Spooky, try yours. Any zip code in the US SHOULD work. Susan
|
|
|
|
susan@bennettme.com
Posts: 27 From: Sagamore Beach, MA Status: offline
|
RE: Compare multiple variables in a DRr? - 1/17/2002 9:41:34
Geez. It's a big world out there! Thank you both so much for your help on this. I've learned a lot through this process. I'm pretty much at the point where I'm fine tuning. For the timebeing the latest version resides at: http://www.carnegiecomm.com/sms/test/zipcode1.asp
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|