NetTalk Central

Author Topic: When session variables do not work ...  (Read 4105 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
When session variables do not work ...
« on: April 05, 2012, 04:26:33 PM »
I have had a problem and just realised what is causing it. This is the scenario ...

I have a browse of Species with validation on it. Normally I want to see all Species records, but if I am selecting Species on a Patient form then I only want to see a subset of the Species.

On the Patient Form where I select these records I set a session variable and use that to control the Species selection. No problem there. On closing the Patient Form in Cancel I set the session variable to null. The idea is that then I can view the Species file independently and see all the records.

However the session variable was still set until I realised that the Browse Patient was still calling the update form behind the scenes and setting the variable (I have it declared in Setup Procedure).

So once I close the patient Form, how can I ensure that the variable is set to Null. Clealy I need to set the variable other than in procedure setup but where?

Thanks

John


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: When session variables do not work ...
« Reply #1 on: April 05, 2012, 09:21:43 PM »
>> (I have it declared in Setup Procedure).

that's clearly the wrong place.
try setting it to 1 in GenerateForm.

cheers
Bruce

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: When session variables do not work ...
« Reply #2 on: April 05, 2012, 10:27:51 PM »
Ooops sorry Bruce. Yes - I resolved this and didn't realise I had actually sent this.

John