This topic is locked

readonly vs writable fields

3/31/2006 11:09:27 PM
ASPRunnerPro General questions
R
robs author

I am still in testing stage of ASPRUNNER 4.0, I would like to make some fields READONLY when EDITING but make them WRITABLE when ADDING or COPING record.

Is there a way to do that?
Thanks,

Sergey Kornilov admin 4/3/2006

Rob,
you can do it in the following way.

Edit SQL query manually on the Edit SQL query Tab. See my example:

select [fieldname1],

[fieldname2],

[b][fieldname2] as [readonly_field][/b]

From [Tablename]



Check off Edit for readonly_field and all other options for fieldname2 on the Choose fields tab and select Readonly for readonly_field in the Edit as dropdown box on the Formatting Tab.

R
robs author 4/3/2006

Rob,

you can do it in the following way.

Edit SQL query manually on the Edit SQL query Tab. See my example:

select [fieldname1],

[fieldname2],

[b][fieldname2] as [readonly_field][/b]

From [Tablename]



Check off Edit for readonly_field and all other options for fieldname2 on the Choose fields tab and select Readonly for readonly_field in the Edit as dropdown box on the Formatting Tab.


Thanks!
That seems to be working now... THNAKS!!! However, one minor issue, my email is not picking up 'myReadOnlyField' field any more. 'My2ndEmailField' is showing in my email.

Here is a sample of my emil code:

message =""

email="test@test.com"

message="This message was sent from ... -" & vbcrlf & Session("UserID") & vbcrlf & dict("myReadOnlyField") & vbcrlf & dict("My2ndEmailField")

subject="record modfied"

sendmail email, subject, message

Sergey Kornilov admin 4/4/2006

Hi,
try to use the following code:

message =""

email="test@test.com"

newemail = rs("myReadOnlyField")

message="This message was sent from ... -" & vbcrlf & Session("UserID") & vbcrlf & newemail & vbcrlf & dict("My2ndEmailField")

subject="record modfied"

sendmail email, subject, message

R
robs author 4/4/2006

Hi,

try to use the following code:


This worked just fine. THANK YOU!

L
luic 4/8/2006

I try the above syntax and it does not work for me. What does the means ? The application won't allow me to move forward if I put [b] and in the SQL.

Sergey Kornilov admin 4/10/2006

Chris,
it seems that there is a syntax mistake in your SQL query.

Post your SQL query and I'll help to find the mistake.