CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Audit Trail (Resolved)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/10/2009, 6:33 AM

I have a record form and whenever a record is created or changed I want to update two hidden fields, "last_modified" (a datetime field) and "modified_by" (an integer field).

I have set the default value of "modified_by" to CCGetUserID()
and
"last_modified" to Date().

Neither of them update to the database.

Any idea why this is not working?

Thanks.


View profile  Send private message
jjrjr1


Posts: 942
Posted: 02/10/2009, 7:41 AM

Hi

Just a guess but when a data field already has data in it the default value is not applied. So. your example above would only place the current datetime and userid when the record is initially created.

After a record is created and being updated you will have to put the current datetime and user id into your hidden fields in the before show event.

In fact you could in all cases load up those fields in the before show event and all should work

Have fun

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
saseow

Posts: 744
Posted: 02/10/2009, 9:26 AM

Thanks jjrjr1,

That works like a dream!
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.