Forums: [SOLVED] Passing value as a parameter from column into Event - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] Passing value as a parameter from column into Event Rate Topic: -----

#1 User is offline   Waleed 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 22-January 15

Posted 28 December 2016 - 02:04 PM

HELLO Everyone :)


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
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15433
  • Joined: 03-February 03

Posted 30 December 2016 - 05:25 PM

If you check this event documentation you will find that you can access any field value as values("FieldName")

http://xlinesoft.com...ecord_added.htm

So your code should look like this:
tmpDict("to")=values("STAFF_EMAIL")

Best regards,
Sergey Kornilov
0

#3 User is offline   Waleed 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 22-January 15

Posted 01 January 2017 - 12:55 PM

View Postadmin, on 30 December 2016 - 08:25 PM, said:

If you check this event documentation you will find that you can access any field value as values("FieldName")

http://xlinesoft.com...ecord_added.htm

So your code should look like this:
tmpDict("to")=values("STAFF_EMAIL")



Thank you very much , it worked
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked