NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started 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
-
Priming ?
-
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
-
Thanks.
I found that SetFormSettings / 2 Start worked for me.
I needed to setup som conditional hidin/unhiding of buttons and fields.
/Poul
-
Why not set this in the fields/buttons itself?
-
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:
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
-
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 )
-
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...
-
Yes it does so for now I will leave it as is.