NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: charl99 on May 04, 2012, 05:38:00 AM

Title: Copy Entire Record to Session Variables?
Post by: charl99 on May 04, 2012, 05:38:00 AM
Hi,

I tried to figure this out (by looking at the PreCopy Routines and stuff), I simply don't understand it :).

I am updating a record, with lots and lots of tabs and fields on it.  Almost every tab or field is dependent on the values of fields in related files (Hide/Unhide, Read Only).

Now I know I can open these files and then p_web.SSV() all the fields one by one in the Pre-Routine, and then in the Post-Routine go and set all of them to be blank again just to make sure they have no impact somewhere else.  But I know someday I will forget to keep this list updated.

So my question (or wish if you like), is there a simple way of setting a _whole_ record to Session Values and then to Clear it again at a later stage.

Thanks

Charl
Title: Re: Copy Entire Record to Session Variables?
Post by: Bruce on May 04, 2012, 06:06:31 AM
to copy the file record to the session queue;

p_web.FileToSessionQueue(customers)

to copy the session queue back to the file record

p_web.SessionQueuetoFile(customers)

to clear all the session fields for a table;

clear(cus:record)
p_web.FileToSessionQueue(customers)

Cheers
Bruce
Title: Re: Copy Entire Record to Session Variables?
Post by: charl99 on May 04, 2012, 06:17:45 AM
Thanks.  I'm now thinking of working tomorrow!