NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Poul Jensen on January 10, 2024, 04:14:09 AM

Title: Which routine in NetWebForm after record has been retrieved
Post by: Poul Jensen 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
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Alberto on January 10, 2024, 07:32:27 AM
Priming ?
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Bruce 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
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Poul Jensen 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
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Alberto on January 12, 2024, 05:08:11 AM
Why not set this in the fields/buttons itself?
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Poul Jensen 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
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Alberto 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 )
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Alberto 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...
Title: Re: Which routine in NetWebForm after record has been retrieved
Post by: Poul Jensen on January 12, 2024, 07:00:56 AM
Yes it does so for now I will leave it as is.