Re: Adding a row..

2002-10-23 Thread Richard Meredith-Hardy
One way to do this is have a set of empty input field(s) after the end
of the lineitems output query called something like "new_fieldname" 

When you come to submit, you update your existing lineitems, then check
if one or more of your new_ fields has a value in it, ie  and if the value(s) check out as
valid, then do an insert query.

Then read the lot with your SELECT query, output it, if insert was good
then it will now be a lineitem.

"Robertson-Ravo, Neil (REC)" wrote:
> 
> eh? so you are adding a 'blank' row to your DB?.. FWIW this is bad DB
> design and should be avoided;  I am not sure what you are trying to achieve
> here . can you elaborate?
> 
> Neil
> 
> -Original Message-
> From: Russ [mailto:russ@;unrealisticexpectations.com]
> Sent: 23 October 2002 06:37
> To: CF-Talk
> Subject: Adding a row..
> 
> All,
> 
> My application has "line items" that are stored in a database for a
> project.
> 
> When you enter the application page, you start with a blank line item.
> You enter your information, you can perform a calculation and then you
> have the option to "Save" the project or you can "Add a Row".
> 
> Saving simply updates the db and then sends you on your merry way.
> 
> Adding a row, on the other hand, updates all current Line Items and then
> returns with a new blank line.
> 
> Additionally, there are fields that calculate certain titles from the
> line items to give dollar amounts, etc.
> 
> The issue I'm having is that I cannot figure out the best approach to
> adding this new line item "row" to my project.
> 
> Does anyone have any examples of this type of application or where
> they've done something similar?
> 
> Thanks,
> 
> Russ Unger
> Managing Partner
> Blue Chrome Design
> www.bluechromedesign.com
> 312.593.4260 :office
> 877.433.8427 :pager
> 312.873.4033 :fax
> 
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Adding a row..

2002-10-23 Thread Robertson-Ravo, Neil (REC)
eh? so you are adding a 'blank' row to your DB?.. FWIW this is bad DB
design and should be avoided;  I am not sure what you are trying to achieve
here . can you elaborate?

Neil

-Original Message-
From: Russ [mailto:russ@;unrealisticexpectations.com]
Sent: 23 October 2002 06:37
To: CF-Talk
Subject: Adding a row..


All,

My application has "line items" that are stored in a database for a
project.

When you enter the application page, you start with a blank line item.
You enter your information, you can perform a calculation and then you
have the option to "Save" the project or you can "Add a Row".

Saving simply updates the db and then sends you on your merry way.

Adding a row, on the other hand, updates all current Line Items and then
returns with a new blank line.

Additionally, there are fields that calculate certain titles from the
line items to give dollar amounts, etc.

The issue I'm having is that I cannot figure out the best approach to
adding this new line item "row" to my project.

Does anyone have any examples of this type of application or where
they've done something similar?

Thanks,

Russ Unger
Managing Partner
Blue Chrome Design
www.bluechromedesign.com
312.593.4260 :office
877.433.8427 :pager
312.873.4033 :fax


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Adding a row..

2002-10-22 Thread Mosh Teitelbaum
I'd suggest tracking the number of rows and dynamically generating the form
fields.  For example, the following code starts with 1 row (containing
"Name" and "Age" fields) and supports the addition of an unlimited number of
rows (note: this code is not tested and very likely has errors given that
I'm writing it off the top of my head at 2 in the morning):

















Name
Age



















The code doesn't take into account how you'd submit all the data for saving.
But you could handle this either with JavaScript changing the form action on
button click or with Cold Fusion by redirecting (or including, depending on
your application flow) another file somewhere.  Anyway, I hope this helps.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Russ [mailto:russ@;unrealisticexpectations.com]
> Sent: Wednesday, October 23, 2002 1:37 AM
> To: CF-Talk
> Subject: Adding a row..
>
>
> All,
>
> My application has "line items" that are stored in a database for a
> project.
>
> When you enter the application page, you start with a blank line item.
> You enter your information, you can perform a calculation and then you
> have the option to "Save" the project or you can "Add a Row".
>
> Saving simply updates the db and then sends you on your merry way.
>
> Adding a row, on the other hand, updates all current Line Items and then
> returns with a new blank line.
>
> Additionally, there are fields that calculate certain titles from the
> line items to give dollar amounts, etc.
>
> The issue I'm having is that I cannot figure out the best approach to
> adding this new line item "row" to my project.
>
> Does anyone have any examples of this type of application or where
> they've done something similar?
>
> Thanks,
>
> Russ Unger
> Managing Partner
> Blue Chrome Design
> www.bluechromedesign.com
> 312.593.4260 :office
> 877.433.8427 :pager
> 312.873.4033 :fax
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm