NetTalk Central

Author Topic: Which routine in NetWebForm after record has been retrieved  (Read 4536 times)

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Which routine in NetWebForm after record has been retrieved
« on: January 10, 2024, 04:14:09 AM »
Where can I check a value in the record when it is first loaded i a form?

tia
/Poul

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #1 on: January 10, 2024, 07:32:27 AM »
Priming ?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Which routine in NetWebForm after record has been retrieved
« Reply #2 on: January 11, 2024, 06:52:30 AM »
you need to provide more context.
Like what action are you talking about here?
Change?

If so, Priming would be the best, failing that PreUpdate  Routine.

Cheers
Bruce

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #3 on: January 11, 2024, 01:09:43 PM »
Thanks.

I found that SetFormSettings / 2 Start worked for me.

I needed to setup som conditional hidin/unhiding of buttons and fields.

/Poul

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #4 on: January 12, 2024, 05:08:11 AM »
Why not set this in the fields/buttons itself?
-----------
Regards
Alberto

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #5 on: January 12, 2024, 05:43:35 AM »
Hi Alberto,

Being new to NT  -  well been away for more than 6 years anyway  :) so I am strugling a bit here, but I have this code:

Code: [Select]
p_web.SSV('ShowStartStop', 0)
p_web.SSV('ShowVarelinier', 0)
p_web.SSV('ShowVarelinierKnapper', 1)
CASE p_web.GetSessionValue('MSagH:Status')
OF 0
    p_web.SSV('ShowStartStop', 1)
    p_web.SSV('l:Status', 'Ny')
OF 1 OROF 2 OROF 22
    IF INSTRING( '.XLS', UPPER( p_web.GetSessionValue('MSagH:SKStype') ), 1, 1)
        p_web.SSV('ShowStartStop', 0)
    ELSE
        p_web.SSV('ShowStartStop', 1)
    END
    p_web.SSV('ShowVarelinier', 1)
    p_web.SSV('l:Status', 'Startet')
OF 3
    p_web.SSV('ShowVarelinier', 1)
    p_web.SSV('ShowVarelinierKnapper', 0)   
    p_web.SSV('l:Status', 'Afsluttet')
OF 4
    p_web.SSV('ShowVarelinier', 1)
    p_web.SSV('ShowVarelinierKnapper', 0)
    p_web.SSV('l:Status', 'Faktureret')
END

And then I indeed check on the individual buttons / fields for the session variables 'ShowStartStop', 'ShowVarelinier' and 'ShowVarelinierKnapper'.

Are there better ways?

/Poul

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #6 on: January 12, 2024, 05:51:43 AM »
I would use somethng like this in the HideIf or DiableIf of each control:

ex:
choose(  INSTRING( '.XLS', UPPER( p_web.GetSessionValue('MSagH:SKStype') ), 1, 1)   ,true, false )
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #7 on: January 12, 2024, 05:52:46 AM »
I would use somethng like this in the HideIf or DiableIf of each control:

ex:
choose(  INSTRING( '.XLS', UPPER( p_web.GetSessionValue('MSagH:SKStype') ), 1, 1)   ,true, false )

but if your code is working...
-----------
Regards
Alberto

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Which routine in NetWebForm after record has been retrieved
« Reply #8 on: January 12, 2024, 07:00:56 AM »
Yes it does so for now I will leave it as is.