This topic is locked

help with events scripting...

10/21/2006 4:57:37 PM
ASPRunnerPro General questions
author

I have successfully formatted the event to send an email after a record is updated, but I would like the message of the email to include the record ID number. How do I modify the script below to include the editid in the massage? Thanks.
message="Hello there" & vbcrlf & "The following record has just be modified:"

Alexey admin 10/23/2006

Hi,
here is the code:

message="Hello there" & vbcrlf & "The following record has just be modified:" & request.Form("editid1")

500393 10/23/2006

Hi,

here is the code:


THanks!

500394 10/25/2006

Alexey: I get an error message when I include " & request.Form("editid1") " in the event script. Is that format correct? Thanks.

Hi,

here is the code:

J
Jane 10/26/2006

Hi,
sorry for my fault.

Here is a correct code:

message="Hello there" & vbcrlf & "The following record has just be modified:" & GetRequestForm("editid1")

500395 10/26/2006

Thanks. We're getting close. When I used this: message="The following record has just be modified:" & GetRequestForm("editid1")
the message of the email was this: The following record has just be modified:
It's leaving off the record number. Any ideas? BTW: Thanks for helping me with this!

Hi,

sorry for my fault.

Here is a correct code:

500396 10/26/2006

Wait - it does work. I should have used "editid" instead of "editid1". Thanks!!!!

Thanks. We're getting close. When I used this: message="The following record has just be modified:" & GetRequestForm("editid1")

the message of the email was this: The following record has just be modified:
It's leaving off the record number. Any ideas? BTW: Thanks for helping me with this!

Sergey Kornilov admin 10/26/2006

There is a difference between ASPRunnerPro 4.1 and 4.0.
I guess you use 4.0 while GetRequestForm("editid1") applies to 4.1.

500397 12/15/2006

In the event script, I receive an email when anyone logs into the database. How would I configure the script to include the name of person who logged in? There are fields for UserID, LastName and FirstName in the user table.
The script I use now is:

email="shipman05@gmail.com"

message="Someone has just logged into the database" & vbcrlf & "EOM"

subject="Dist. 32A Database - Login"

sendmail email, subject, message

End Sub
Sergey Kornilov admin 12/15/2006

What event do you use for this purpose?
What is the name and data type of the field where you store username?