NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Ubaidullah on October 03, 2011, 01:54:27 AM
-
Hi,
In an NetWebForm, I have a field with 'Required' checked in the 'Validation' tab and a lookup procedure specified in the 'Lookup Settings' tab along with the lookup table information. Now, if the user enters a value that does not exist in the lookup table, it allows the record to be saved.
How do I ensure that any value entered exists in the lookup table?
Thanks & Regards,
Ubaidullah Nubar.
-
I have exactly the same "problem"....
On validate on this field, Add Server Side code embed
! Servers SIDE
lok:sif_art=format(p_web.gsv('MRS:SIF_ART'),@N06)
ART:SIF_ART = lok:sif_art
ACCESS:ARTIKLI.TRYFETCH(ART:Art)
IF ERRORCODE()
p_web.ssv('MRS:SIF_ART','')
p_web.setvalue('SelectField',clip(loc:formname) & '.MRS:SIF_ART') ! on errorcode() user enter any value that not exist in table, or leave it empty...
p_web.ssv('NotExist',1)
ELSE
p_web.ssv('MRS:NAZIV_ART',ART:NAZIV)
p_web.ssv('lok:naziv_artikla',ART:NAZIV)
p_web.ssv('MRS:SIF_ART',ART:SIF_ART)
lok:naziv_artikla = art:naziv
loc:comment = p_web.Translate(lok:naziv_artikla)
END
-
Thanks. This solved my issue.