This topic is locked

After Record Update

9/13/2007 3:37:42 PM
ASPRunnerPro General questions
B
Bryan author

Hi,
I have an edit page which has the following fields:
Matter Number - set as read only

Date Due - edit allowed

Diary Item - edit allowed

Schedule Code - set as read only

Complete - edit allowed
On my Ater Record Update event I have the following code:
dim fs,f

set fs=Server.CreateObject("Scripting.FileSystemObject")

set f=fs.OpenTextFile("C:\Output.txt",8,true)

f.WriteLine dict("Matter Number") &"|" &dict("Date Due") &"|" &dict("Diary Item") &"|" &dict("Schedule code") &"|" &dict("Complete")

f.Close

set f=Nothing

set fs=Nothing
This data is then passed to another application.
My problem is when the event is run, only the fields that were allowed to be edited are output, so i get:
<blank>|2007-10-12|Test Item|<blank>|Yes
Is there a way of outputting the value without turning edit on? I cannot run the risk of someone changing the Matter number or Schedule Code so it must remain read only.
Thanks,

Bryan

Alexey admin 9/14/2007

Bryan,
dict contains values to be written to database.

So there are no readonly field values.
With ASPrunner 5.1 you can use oldvalues array to access readonly field values.

I.e.

f.WriteLine oldvalues("Matter Number") &"|" &dict("Date Due") &"|" &dict("Diary Item") &"|" &oldvalues("Schedule code") &"|" &dict("Complete")

B
Bryan author 9/14/2007

Ah I see - works perfectly!
Many thanks for the reply.
Kind regards,

Bryan