NetTalk Central

Author Topic: Copy Entire Record to Session Variables?  (Read 4090 times)

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Copy Entire Record to Session Variables?
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: Copy Entire Record to Session Variables?
« Reply #1 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

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Copy Entire Record to Session Variables?
« Reply #2 on: May 04, 2012, 06:17:45 AM »
Thanks.  I'm now thinking of working tomorrow!