This topic is locked

EDIT page and event 'Before record updated'

6/17/2008 9:27:01 AM
ASPRunnerPro General questions
P
Philip author

Hi
I added an event "Before record updated / Send Email with new data" to my EDIT page. When I save the record ASPRunner shows above the "back to list" link all field names and values (see screenshot). I'm 100% shure that I did not have this behaviour in older versions of ASPRunner.

QUESTION: where does this come from an how can I change it to "normal behaviour" ?

Screenshot

P
Philip author 6/17/2008

I just tested an "After record updated" event and it's even worse: ALL field names and values are shown, even fields that are not included to the EDIT page among these especially the password field ...

Sergey Kornilov admin 6/17/2008

Post your code here.

P
Philip author 6/17/2008

Here is the code
**
Dim dkeys

message =""
dkeys = dict.keys

For n = 0 To dict.Count-1

message = message & dkeys(n) & " : " & dict(dkeys(n)) & vbcrlf

Next
email="aoa@agilitysports.ch"

subject="Meldestelle Nr. " & GetRequestForm("editid1") & " via TKAMO wurde mutiert"
sendmail email, subject, message
BeforeEdit = True
**
Regards

Philip

J
Jane 6/18/2008

Philip,
try to use this code:

Dim dkeys

email_message =""
dkeys = dict.keys

For n = 0 To dict.Count-1

email_message = email_message & dkeys(n) & " : " & dict(dkeys(n)) & vbcrlf

Next
email="aoa@agilitysports.ch"

subject="Meldestelle Nr. " & GetRequestForm("editid1") & " via TKAMO wurde mutiert"
sendmail email_message, subject, message
BeforeEdit = True

P
Philip author 6/18/2008

Jane,

many thanks - you pointed to the right direction but there was still one thing to fix (your sendmail line is wrong).

Here is the correct and working code:
****

Dim dkeys

message =""
dkeys = dict.keys

For n = 0 To dict.Count-1

[color="#FF0000"]email_message = & dkeys(n) & " : " & dict(dkeys(n)) & vbcrlf

Next
email="aoa@agilitysports.ch"

subject="Meldestelle Nr. " & GetRequestForm("editid1") & " via TKAMO wurde mutiert"
sendmail email, subject, [color=#FF0000]email_message
BeforeEdit = True

****
Nevertheless I ask why did you change the behaviour of ASPRunner? My original code was based on what ASPRunner suggests. Now a lot of us will have to change all the time manually event code. Is there chance that you will fix this in next release? Please ... :-)
Thanks and regards

Philip

J
Jane 6/19/2008

Philip,
we'll fix it in the next version.