Been there, had that client. You do still need to keep in mind things like 
whether or not a record is "complete" if they haven't filled everything in, 
when you're storing data like this. And, you might want to consider adding 
something like "Step 2 of 546." to your screens, so people can see how far 
along they are. Though, I still go back to saying that I'm not sure what the 
benefit is to having each on a separate page. You're doing a logic model 
program planning process, right? (Twas pioneered here in Wisconsin.) There 
aren't _that_ many steps to that. I'd at least group all the questions from 
each phase together.


Situation Analysis
    vision
    mission
    etc

Inputs
    investment by....
Outputs
    what we do
    who we reach
Outcomes
    short term results
    medium term results
    long term results


As to putting stuff in session vars - yah, it's pretty easy. You're on 6.1, 
right? So, locking isn't the major conundrum it used to be. You can save 
your whole query results to the session, and then you'd just reference them 
as #session.queryname.columnname.# But, I'm not sure you then update that 
directly. I think you'd have to make it a structure instead, but since each 
query should only have one row of data returned, that's not such a big deal. 
You can just do this sort of thing:

<cfif not isdefined("session.test") or structKeyExists(url, "reset")>
    <cfquery name="test"..../>

    <cflock scope="session" type="exclusive" timeout="10">
        <cfset session.test = test>
    </cflock>

</cfif>

Then, when you update a record, you can just do:

    <cflock scope="session" type="exclusive" timeout="10">
        <cfset session.test.mycolumn[1] = form.mycolumn>
    </cflock>






----- Original Message ----- 
From: "daniel kessler" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Thursday, May 19, 2005 12:41 PM
Subject: Re: form->database->form help needed


> >I think he's just talking about a simple multi-page form, but instead of
>>storing the info in the session scope and inserting upon completion, he's
>>inserting between each page.
>
> well it's a distinct form on each page, but yes, I go to the db between 
> each page for an UPDATE
>
>>So, Daniel, yes - you can retrieve the record set you're working with and
>>store it. I'd probably go with storing it in the session scope. But, be
>>aware that every time your user updates a page, you'll need to also update
>>that session scope var. I'd maybe think twice about your design - that's a
>>lot of round trips to the database.
>
> It's this way because I was told "what if they just close the page" or a 
> whole bunch of other what-ifs and was told that not only would it need to 
> store it between each page, but that it also had to have a Save button on 
> each page just in case they wanted to save partially typed information. 
> Some of the entries can be thousands of characters.
>
>>You could, instead, be storing stuff in
>>the session scope as they go, and then have a "save" button (repeated on
>>each page), that saves their current work-state. It depends on the
>>sophistication level of your users, and what you're really trying to
>>collect.
>
> So at the beginning, I should do a db query and store it to the session 
> scope and while I don't know how to address the session scope, it seems it 
> would be pretty easy to look up.  Then each one of the form fields just 
> needs to reference that to fill-in.  And as you said, I'd also have to 
> fill it in whenever I go to the database, not as a seperate database call 
> but just <cfset session.var = "something"> (or however it's done).
>
> Does that all sound right?
>
> btw, here's an example of one of the pages, not that it will help I think:
> http://hhp.umd.edu/empower/situation_analysis/s_vision_01_test.cfm
>
> thanks!
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207201
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to