Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th October 2007, 08:31
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
Dynamic domain range validation

Sometimes either due to space constraints on form or due to functionality requirement , developer may be required to let user enter data of any domain on a string field . In such a case, it may be useful to validate the user entry as per the domain range. Preventing user enter wrong data will also prevent the storage of wrong data . Here is a code sample which lets program validate the user entered data with any domain (cdomn) range on a string field (frst) and prompt him/her the domain validation message in case of error .
Code:
field.frst:
check.input:
ret = rdi.column(tudll942.fdnm,cdomn,coffset,csize,cdept,
	ctype,cflag,cdflt)
|condition Added to provide for compnr
if  not isspace(cdomn)  then
	ret = rdi.domain(cdomn,oformat,lechar,ilchar,adjust,errmess,exprid)
	if  exprid <> 0 then
		on case ret
		case db.string:
		case db.multibyte:
			if not l.expr(exprid,frst) then
				if not isspace(errmess) then
					set.input.error(errmess)
				else
					set.input.error("tudll00069",1)
				endif
				|("Out of range")
			endif
			break
		case db.float:
		case db.double:
			tmpdval = val(frst)
			if not l.expr(exprid,tmpdval) then
				if not isspace(errmess) then
					set.input.error(errmess)
				else
					set.input.error("tudll00069",1)
				endif
				|("Out of range")
			endif
			break
		default:
			tmplval = lval(frst)
			if not l.expr(exprid,tmplval) then
				if not isspace(errmess) then
					set.input.error(errmess)
				else
					set.input.error("tudll00069",1)
				endif
				|("Out of range")
			endif
			break
		endcase 
	endif
endif

Last edited by ~Vamsi : 17th October 2007 at 16:21.
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BaaN Report Issue countnikon Tools Development 6 20th July 2007 22:39
Recognition of Variables Dämibur Tools Development 3 10th March 2005 21:28
before.rewrite mquinio Tools Development 12 3rd February 2005 11:27
solving recursion problems rmarles Tools Development 2 25th January 2005 21:23
using dll tiitmdll0003 ckassab Tools Development 2 7th December 2004 00:52


All times are GMT +2. The time now is 12:13.


©2001-2017 - Baanboard.com - Baanforums.com