This topic is locked
[SOLVED]

 'Before Record Added' event simple question

9/15/2011 9:23:32 AM
ASPRunnerPro General questions
H
harringtonb author

Hi

I am using ASPRunner 6.3 and have a quick question on the use of the 'Before record Added' coding standard.

I have a web page with three fields:
[b]Field Name

Archive Tick

Archive By

Archive Date
The 'Archive By' and 'Archive Dat'e fields are not visible to the user.When a user is adding a new record and ticks the 'Archive Tick' field I want the 'Archive by' to be autopopulated with the persons session id and the 'Archive Date' field to be autopopulated with todays date.

On the 'Before record Added' page I added the following:

if values("Archive Tick") = true then

values("Archive By")=session("displayname")

values("Archive Date")=date()

endif
But this does not appear to be working. Any ideas?

Thanks in advance

Brian

Sergey Kornilov admin 9/15/2011

Try this:

if values("Archive Tick") = true then

values("Archive By")=Session("UserID")

values("Archive Date")=Now()

end if
H
harringtonb author 9/15/2011

Hi

I tried your code but still not joy. The list view of the records shows the record was added and that the 'Archive Tick' field was ticked. However the 'Archive By' and 'Archive Date' fields are still blank.

Anything else I could try?
Thanks and regards,

Brian



Try this:

if values("Archive Tick") = true then

values("Archive By")=Session("UserID")

values("Archive Date")=Now()

end if


H
harringtonb author 9/15/2011

Hi
Instead of using :

if values("Archive Tick") = true then
I used:
if values("Archive Tick") = 1 then
and that worked.
Thanks and regards,

Brian