This topic is locked
[SOLVED]

 Passing value as a parameter from column into Event

12/28/2016 9:04:23 AM
ASPRunnerPro General questions
L
loda_65 author

HELLO Everyone <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=24381&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
This is a re-post after using a wrong thread section
i am trying to create an email notification event and the email recipient to be captured from the record added ( for example Field/Column name is "STAFF_EMAIL" )
Add page ( After record added ) event

Action : Send Simple email
dim tmpDict

set tmpDict = CreateObject("Scripting.Dictionary")

tmpDict("to")="test@test.com" <---------------------------- need to insert a parameter ( contains Email value ) captured from the new record added

tmpDict("subject")="Sample subject"

tmpDict("body")="Hello there" & vbcrlf & "Best regards"

set attachments = CreateObject("Scripting.Dictionary")

'attachments(0) = getabspath("files/1.jpg")

'attachments(1) = getabspath("files/2.jpg")

set tmpDict("attachments") = attachments

set ret=runner_mail(tmpDict)

if not ret("mailed") then

response.write ret("message")

end if

admin 12/30/2016

If you check this event documentation you will find that you can access any field value as values("FieldName")
http://xlinesoft.com/asprunnerpro/docs/after_record_added.htm
So your code should look like this:

tmpDict("to")=values("STAFF_EMAIL")
L
loda_65 author 1/1/2017



If you check this event documentation you will find that you can access any field value as values("FieldName")
http://xlinesoft.com/asprunnerpro/docs/after_record_added.htm
So your code should look like this:

tmpDict("to")=values("STAFF_EMAIL")



Thank you very much , it worked