This topic is locked

Table Events

2/8/2006 11:47:45 AM
ASPRunnerPro General questions
J
jaimes0812 author

I need to capture the field values the user selects on the edit form...could you help me correctly build the code needed?
The field names are "PwdNeverExpires" and "AccountDisabled"
strField1 = <I NEED THE VALUE OF THE FIELD FROM THE EDIT FORM>

strField2 = <I NEED THE VALUE OF THE FIELD FROM THE EDIT FORM>
Thank you!

J
jaimes0812 author 2/8/2006

I found the solution needed...
strField1 = GetRequestForm("PwdNeverExpires")

strField2 = GetRequestForm("AccountDisabled")
Thank you anyways... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=7918&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' />

J
jaimes0812 author 2/8/2006

I found another scenario that I would like to be able to do. Using the the before update event, i would like to compare the value in a field before the user made a change and the new value the user made the change to. I was thinking the following code would work, but the two values are the same...
strPwdNeverExpires = GetRequestForm("PwdNeverExpires")

strPwdNeverExpires_RS = rs.Fields("PwdNeverExpires").Value
Any suggestions???

admin 2/8/2006

Your code is correct.
I just ran a simple test:

Function BeforeEdit(dict, where)
response.write GetRequestForm("Make")

response.write rs("Make")
BeforeEdit = True
End Function


This prints two different values, new and old one. Make sure you have modified PwdNeverExpires field value on the edit page.

J
jaimes0812 author 2/8/2006

I am unable to replicate the different values. I've tried moving the 'BeforeEdit=True' before and after my code. I will keep checking to see if I can find an oddball situation.
The results for the 'response.write'...
GetRequestForm: No

rs.Fields: No
Below is snipet of my code...
Function BeforeEdit(dict, where)
set objDomain = createobject("echauditor.EchAudit")
response.write "GetRequestForm: " & GetRequestForm("PwdNeverExpires") & "
"

response.write "rs.Fields: " & rs.Fields("PwdNeverExpires").Value
strPwdNeverExpires = GetRequestForm("PwdNeverExpires")

strPwdNeverExpires_RS = rs("PwdNeverExpires")
If strPwdNeverExpires = strPwdNeverExpires_RS Then

strResponse = objDomain.put_PwdNeverExpires(rs.Fields("sAMAccountName").value,"DEFAULT", strPwdNeverExpires)

End If
set objDomain = Nothing

BeforeEdit = True
End Function

admin 2/8/2006

Did you change PwdNeverExpires value on the Edit page?
Just in case try to print dict("PwdNeverExpires") as well.

J
jaimes0812 author 2/8/2006

The following values are displayed after the update is complete...
GetRequestForm: No

rs.Fields: No

dict: No
response.write "GetRequestForm: " & GetRequestForm("PwdNeverExpires") & "
"

response.write "rs.Fields: " & rs.Fields("PwdNeverExpires").Value & "
"

response.write "dict: " & dict("PwdNeverExpires")
I would change field "PwdNeverExpires" value from Yes to No and visa versa and the results printed would all be the same.

admin 2/9/2006

If you are registered ASPRunnerPro customer send your files to support@xlinesoft.com. I need all files from ASPRunnerPro output folder along with your database and project file.