This topic is locked
[SOLVED]

 LOGON_USER and before record added

5/24/2011 11:36:16 AM
ASPRunnerPro General questions
G
GerryT author

I am attempting to get the ServerVariables("LOGON_USER") to be automatically added when you do "add record". I am able to get it to work on Before record update but not before record added or before page displayed (add). If i add the line of code to before record added it will display the output in "Field1" but will never actually save the record (will just loop). I would appreciate any help.
Thanks!
beffore record update event (that works):
dict("Field1") = Request.ServerVariables("LOGON_USER")

Sergey Kornilov admin 5/25/2011

According to the manual (http://xlinesoft.com/asprunnerpro/docs/before_record_added.htm)

values - array of values to be written to the database. To access specific field value use values("FieldName").

Field names are case-sensitive. If the field name is PlayerId, you should use values("PlayerId"). Note that values("playerid") or values("PlayerID") will not work.


dict("Field1") is incorrect. Use values("Field1").

G
GerryT author 5/26/2011

I was able to find out exactly what I was doing incorrect. The code above does work, it was just my placement.
Thanks!