Yes, that was much clearer.  Thank you  :)

Are you using the cfapplication tag in your application?  Do you have 
session management enabled?

If so, you can keep a list of the user's operations in a session variable.

<cfset session.array_of_user_actions = arrayNew(1)>
<cfset arrayAppend(session.array_of_user_actions,"User Inserted Record A")>
<cfset arrayAppend(session.array_of_user_actions,"User Updated Record B")>
<cfset arrayAppend(session.array_of_user_actions,"User Scratched His Head")>

This would create an array that you could append to as you saw fit with the 
user's actions.  I don't neccessarily think it's the best way to audit your 
users actions, but it would work.

Session variables do not get deleted at the end of your page request.  They 
will be available on each subsequent request from the same user providing 
his session has not timed out.

<h3>User's Activity During This Session</h3>
<cfloop array="#session.array_of_user_actions#" index="this_action">
    #this_action#<br>
</cfloop>


As far as knowing whether you are inserting or updating-- Generally when a 
user is updating a record, he selects it from some list and you populate the 
values for it into a form.  At that point simply place the primary key from 
that table in a hidden field in the form.  When you submit the form, the 
processing page can look for the existence of that hidden form field.  If 
the primary key was passed, it's an update, otherwise it's an insert.

~Brad

----- Original Message ----- 
From: "Priya Koya" <priya23...@gmail.com>
To: "cf-talk" <cf-talk@houseoffusion.com>
Sent: Monday, March 09, 2009 9:49 AM
Subject: Re: Compare FieldValues with DataBase Values


>
> Yes, I can use select statement but I am able to display only the  latest
> taction taken to the coldfusion page but not all the list of actions taken
> in a user session.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320278
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to