NetTalk Central

Author Topic: unresponsive local variable on a NT Form  (Read 4570 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
unresponsive local variable on a NT Form
« on: July 21, 2020, 10:59:34 PM »
Hello,
I have an app with NT 11.40 and a local variable (byte, no validity checks and Entry ) on a NetWeb Form
My problem is that  there are in a case statement, 8 choices under this local variable and the code is not recognizing the selection.

The variable is called lBreakType
The 8 options are displayed on a Form
and obviously depending on which option is selected, determines the code to run
The embed is Validate All  3End
I have  not edited this code for some time, last leaving it working.

Is it possible NT11.40 now requires Updates to be on a different embed
I have tried the code on the new embed Validate Update but no difference.
I am repeatedly selecting  lBreakType option = 4
(Excuse the stops they are there for a quick and dirty check)
Any guidance as to what I should be looking for?
Thanks
best,
Richard

 an exert of the code:
 IF p_web.GetSessionValue('lBreakType') = 0
            STOP('lBreakType = 0' )
      ELSIF p_web.GetSessionValue('lBreakType')  > 1
            STOP( 'lBreakType GREATER THAN 1' )       
      END 
       
       
      CASE lBreakType !Check whether a Break has been selected
       
       
      OF 0    !Nothing Selected
          loc:alert = p_web.translate('Selection of a Tea or Meal Break ') & ' ' & p_web.site.RequiredText 
         
      OF 1    !AM Tea Break Start Selected     
                 do something and update

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: unresponsive local variable on a NT Form
« Reply #1 on: July 22, 2020, 05:16:14 AM »
Hi Richard, this line:

CASE lBreakType !Check whether a Break has been selected

must be

CASE p_web.gsv('lBreakType') !Check whether a Break has been selected

Regards
-----------
Regards
Alberto

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Re: unresponsive local variable on a NT Form
« Reply #2 on: July 22, 2020, 06:16:31 AM »
Thanks for that - yes I have now have  that but for some reason I cannot get it set  the SetSessionvalue wont  work anywhere....
as TRACE is returning 0 for  p_web.gsv('lBreakType')
R

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Re: unresponsive local variable on a NT Form
« Reply #3 on: July 22, 2020, 06:19:45 AM »
This code
 IF p_web.GetSessionValue('lBreakType') = 0
            STOP('lBreakType = 0' )
      ELSIF p_web.GetSessionValue('lBreakType')  > 1
            STOP( 'lBreakType GREATER THAN 1' )       
 END

Is not working.
I know the value is 4  which suggests that the setting is not working
So where should I force the SSV once the selection has been made?

Richard I

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Re: unresponsive local variable on a NT Form
« Reply #4 on: July 22, 2020, 06:22:48 AM »
The routine was working on NT 11.27 and ST 3.15
However, Without changing any code following  the upgrade to NT 11.40 and the latest ST - it failed.
R

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: unresponsive local variable on a NT Form
« Reply #5 on: July 22, 2020, 10:06:58 PM »
Hi Richard,

I recommend you
a) set it back to the way it was working before and
b) post an example app so I can duplicate the issue here.

Debugging by random-guessing is seldom fruitful.

cheers
Bruce