[ver]
	4
[sty]
	
[files]
[charset]
	82
	ANSI (Windows, IBM CP 1252)
[revisions]
	0
[recfile]
	d:\amipro\docs\script\ch1foo.sam
	
	1
	1
	3
	12
	1440
	1440
[prn]
	PostScript (QMS)
[port]
	LPT3:
[lang]
	1
[fldnames]
	Field1
	Field2
	Field3
	Field4
	Field5
	Field6
	Field7
	Field8
[desc]
	
	
	
	
	
	801259954
	115
	780169619
	11241
	20
	0
	0
	0
	0
	
	
	
	
	
	
	1
[fopts]
	0
	1
	0
	0
	
	
[lnopts]
	2
	Body Text
	1
[docopts]
	5
	2
[GramStyle]
	
[ParaNum]
	1
[tag]
	Body Text
	2
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		100
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Body Text
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Ahead
	3
	[fnt]
		Arial
		220
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		240
		4
		79
		0
		3
		100
	[brk]
		112
	[line]
		16
		2160
		3
		0
		1
		1
		1
		65
		10
		1
	[spec]
		0
		1
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Bhead title
	4
	[fnt]
		Arial
		200
		0
		16385
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		220
		4
		79
		0
		3
		100
	[brk]
		80
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Chead title
	5
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		79
		0
		3
		100
	[brk]
		112
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		3
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Bhead
	6
	[fnt]
		Arial
		200
		0
		16385
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		220
		4
		180
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Chead
	7
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		3
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Numbered list
	8
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		300
		300
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		5
		<*:>.
		0
		3
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Numbered list
	0
	0
[tag]
	1st lev para
	9
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		0
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		68
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	1st lev para
	0
	0
[tag]
	Bullet
	11
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		120
		180
		180
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		</U>
		0
		3
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Bullet
	2
	1
	160
	1
	400
	0
[tag]
	Indnt bullet
	12
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		420
		180
		180
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		16
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		</U>
		0
		3
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Indnt bullet
	0
	0
[tag]
	2nd lev para
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		600
		0
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	2nd lev para
	0
	0
[tag]
	See also prnt
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also prnt
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Book art
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Book art
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Callout text
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Callout text
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Figure title
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		40
		60
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Figure title
	0
	0
[tag]
	Chapter title
	0
	[fnt]
		Arial
		280
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		300
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Chapter title
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	1st pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	1st pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Right pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Right pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Left pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Left pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Table title
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		60
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		7
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Table title
	0
	0
[tag]
	Table col hd
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		4
	[line]
		10
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		6
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		256
		1
		0
		
		
		
	Table col hd
	0
	0
[tag]
	Table Text
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		200
		4
		79
		0
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		256
		1
		0
		
		
		
	Table Text
	0
	0
[tag]
	See also hlp
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		40
		4
		180
		0
		3
		100
	[brk]
		96
	[line]
		9
		0
		3
		0
		1
		1
		1
		70
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also btn
	0
	120
[tag]
	See also btn
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		240
	[spc]
		24
		200
		4
		0
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also btn
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Crossref
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		513
		3
		0
		300
		600
	[spc]
		24
		200
		4
		19
		0
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Crossref
	0
	0
[tag]
	Indnt caution
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		720
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Indnt caution
	0
	0
[tag]
	Indnt tip
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		324
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Tip
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Indnt tip
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Indnt note
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		468
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Indnt note
	0
	0
[tag]
	Caution
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		720
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Caution
	0
	0
[tag]
	Tip
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		324
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Tip
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Tip
	0
	0
[tag]
	Note
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		468
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Note
	0
	0
[tag]
	Mono
	0
	[fnt]
		Courier New
		180
		0
		32768
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		48
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Mono
	15
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	1
	2880
	1
	3360
	1
	3840
	1
	4320
	1
	4800
	1
	5280
	1
	5760
	1
	6240
	1
	6720
	1
	7200
	0
[tag]
	Indnt mono
	0
	[fnt]
		Courier New
		180
		0
		32768
	[algn]
		1
		3
		300
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		32
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Indnt mono
	15
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	1
	2880
	1
	3360
	1
	3840
	1
	4320
	1
	4800
	1
	5280
	1
	5760
	1
	6240
	1
	6720
	1
	7200
	0
[tag]
	Dhead
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Parameter
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		0
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Parameter
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Formula
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Formula
	0
	0
[tag]
	Browse
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		+
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Browse
	0
	0
[tag]
	Keyword
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		K
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Keyword
	0
	0
[tag]
	Context
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		#
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Context
	0
	0
[tag]
	Title
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		$
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Title
	0
	0
[tag]
	Macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		!
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Macros
	0
	0
[tag]
	Footnote
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		244
		0
	[spc]
		40
		2400
		3
		0
		0
		1
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		256
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Footnote
	0
	0
[tag]
	Alink
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		A
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Alink
	0
	0
[tag]
	Butnbar
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		0
		0
		3
		100
	[brk]
		48
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		\li-140 
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Butnbar
	0
	0
[tag]
	Window
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		>
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Window
	0
	0
[tag]
	Win95 macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		W
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Win95 macros
	0
	0
[tag]
	Win31 macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		X
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Win31 macros
	0
	0
[tag]
	Build tag
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		*
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Build tag
	0
	0
[tag]
	_COND_IF
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_IF
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	_COND_ELSE
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_ELSE
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	_COND_ENDIF
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_ENDIF
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[frm]
	1
	1573060
	960
	9388
	9437
	11299
	0
	1
	1
	1 0 0 0 0 0 0
	0
	16777215
	5
	0
	10751
	51202 36864
	[frmlay]
		6053
		8477
		1
		0
		0
		1
		9388
		0
		0
		2
		0
		1
		1
		0
		1
		1584
		8496
		0
	[tbl]
		 30 4 200 86 1440 0 1 43 43
		[h]
			 0 210 86 18 0 4 0
			 1 600 86 2 0 1 0
			 2 800 86 2 0 1 0
			 3 1400 86 2 0 1 0
			 4 1200 86 2 0 1 0
			 5 1000 86 2 0 1 0
			 6 1000 86 2 0 1 0
			 7 1200 86 2 0 1 0
			 8 1200 86 2 0 1 0
			 9 1000 86 2 0 1 0
			 10 1600 86 2 0 1 0
			 11 1600 86 2 0 1 0
			 12 1200 86 2 0 1 0
			 13 1200 86 2 0 1 0
			 14 1200 86 2 0 1 0
			 15 1000 86 2 0 1 0
			 16 1400 86 2 0 1 0
			 17 1600 86 2 0 1 0
			 18 1200 86 2 0 1 0
			 19 1200 86 2 0 1 0
			 20 1000 86 2 0 1 0
			 21 1200 86 2 0 1 0
			 22 1000 86 2 0 1 0
			 23 1000 86 2 0 1 0
			 24 1200 86 2 0 1 0
			 25 1200 86 2 0 1 0
			 26 1000 86 2 0 1 0
			 27 1200 86 2 0 1 0
			 28 1200 86 2 0 1 0
			 29 800 86 2 0 1 0
		[e]
		[w]
			 0 1293 0 2 0
			 1 1828 0 2 0
			 2 880 0 2 0
			 3 4433 0 2 0
		[e]
		[data]
			 0 0 24 0 0 0 4352 1 0 0 0 0
@Table col hd@<+B>Scope

>
			 0 1 24 0 0 0 4352 1 0 0 0 0
@Table col hd@<+B>Notes <+,>Object<-,>

>
			 0 2 24 0 0 0 4352 1 0 0 0 0
@Table col hd@<+B>Type

>
			 0 3 24 0 0 0 4352 1 0 0 0 0
@Table col hd@<+B>How to <+,>Design and Ac<-,>tivate

>
			 1 0 0 0 0 0 0 1 0 0 0 0
Workspace

>
			 1 1 0 0 0 0 0 1 0 0 0 0
SmartIcons</n><:X8,0;Index "SmartIcon script or formula" # "where used">

>
			 1 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 1 3 0 0 0 0 0 1 0 0 0 0
To design, choose File - Tools - SmartIcons Setup. Click the icon, Edit Icon, and then Formula. To activate, click the icon.

>
			 2 0 0 0 0 0 0 1 0 0 0 0
Database

>
			 2 1 0 0 0 0 0 1 0 0 0 0
Replication formula<:X8,0;Index "Replication formula" # "where used">

>
			 2 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 2 3 0 0 0 0 0 1 0 0 0 0
To design, choose File - Database - Properties. Click Basics, Replication Settings, and then Advanced. Click "Only replicate selected documents" and the @ symbol. Activated when replication occurs.

>
			 3 1 0 0 0 0 0 1 0 0 0 0
Agent<:X8,0;Index "Agent script or formula" # "where used">

>
			 3 2 0 0 0 0 0 1 0 0 0 0
<:s>Script

Formula

>
			 3 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Agents. Select the agent and choose Actions - Edit Agent, or choose Create - Agent. Click Script or Formula for Run. If you click Script, select I<+,>NITIALIZE<-,> or Terminate for Event. To activate, set a schedule, send mail, modi
fy a document, choose Actions - NameOfAgent, or while in View - Agents choose Actions - Run Agent.

>
			 4 0 0 0 0 0 0 1 0 0 0 0
View design

>
			 4 1 0 0 0 0 0 1 0 0 0 0
Form formula<:X8,0;Index "Form formula" # "where used">

>
			 4 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 4 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Views. Double-click the view, or choose Create - View and double-click the new view. Choose Design - View Properties, click the propeller head, and then click Formula Window. Activated when a document is opened from
 the view.

>
			 5 1 0 0 0 0 0 1 0 0 0 0
Selection formula<:X8,0;Index "Selection formula" # "where used">

>
			 5 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 5 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Views. Double-click the view, or choose Create - View and double-click the new view. Select View Selection for Define and click Formula for Run. Activated when the view is opened.

>
			 6 1 0 0 0 0 0 1 0 0 0 0
Column formula<:X8,0;Index "Column formula" # "where used">

>
			 6 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 6 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Views. Double-click the view, or choose Create - View and double-click the new view. Select the column for Define and click Formula for Run. Activated when the view is opened.

>
			 7 1 0 0 0 0 0 1 0 0 0 0
Action<:X8,0;Index "Action script or formula" # "where used">

>
			 7 2 0 0 0 0 0 1 0 0 0 0
Script<-!>

Formula

>
			 7 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Views. Double-click the view, or choose Create - View and double-click the new view. Choose View - Actions and select the action, or choose Create - Action. To activate, choose Actions - NameOfAction or click the ac
tion button.

>
			 8 1 0 0 0 0 0 1 0 0 0 0
Show action formula<:X8,0;Index "Show action formula" # "where used">

>
			 8 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 8 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Views. Double-click the view, or choose Create - View and double-click the new view. Choose View - Actions and double-click the action, or choose Create - Action. Click Hide and "Hide action if formula is true." Act
ivated when the view is opened.

>
			 9 0 0 0 0 0 0 1 0 0 0 0
Form design

>
			 9 1 0 0 0 0 0 1 0 0 0 0
Window title formula<:X8,0;Index "Window title formula" # "where used">

>
			 9 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 9 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select Window Title for Event. Activated when a document based on the form is opened.

>
			 10 1 0 0 0 0 0 1 0 0 0 0
Section title formula<:X8,0;Index "Section title formula" # "where used">

>
			 10 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 10 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select a standard section, or choose Create - Section - Standard and select the new standard section. Choose Se
ction - Section Properties and click Formula. Activated when a document based on the form is opened.

>
			 11 1 0 0 0 0 0 1 0 0 0 0
Section access formula<:X8,0;Index "Section access formula" # "where used">

>
			 11 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 11 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select a controlled access section, or Choose Create - Section - Controlled Access and select the new controlle
d access section. Choose Section - Section Properties and click Formula. Activated when the section is accessed.

>
			 12 1 0 0 0 0 0 1 0 0 0 0
Hidden paragraph formula<:X8,0;Index "Hidden paragraph formula" # "where used">

>
			 12 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 12 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Choose Text - Text Properties, click the window blind, and select "Hide Paragraph if formula is true." Activate
d when the text is accessed.

>
			 13 1 0 0 0 0 0 1 0 0 0 0
Action<:X8,0;Index "Action script or formula" # "where used">

>
			 13 2 0 0 0 0 0 1 0 0 0 0
<:s>Script

Formula

>
			 13 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Choose View - Actions and select the action, or choose Create - Action. To activate, choose Actions - NameOfAct
ion or click the action button.

>
			 14 1 0 0 0 0 0 1 0 0 0 0
Show action formula<:X8,0;Index "Show action formula" # "where used">

>
			 14 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 14 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Choose View - Actions and select the action, or choose Create - Action. Click Show. Activated when a document b
ased on the form is opened.

>
			 15 1 0 0 0 0 0 1 0 0 0 0
Event script<:X8,0;Index "Event script" # "where used">

>
			 15 2 0 0 0 0 0 1 0 0 0 0
Script

>
			 15 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select Opening, Closing, I<+->NITIALIZE<-->, or Terminate for Event. Activated when the event occurs.

>
			 16 1 0 0 0 0 0 1 0 0 0 0
Button<:X8,0;Index "Button script or formula" # "where used">

>
			 16 2 0 0 0 0 0 1 0 0 0 0
<:s>Script

Formula

>
			 16 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select a button or choose Create - Button. Click Script or Formula for Run. If you click Script, select Click, 
Initialize, or Terminate for Event. To activate, open a document based on the form and click the button.

>
			 17 1 0 0 0 0 0 1 0 0 0 0
Hotspot<:X8,0;Index "Hotspot script or formula" # "where used">

>
			 17 2 0 0 0 0 0 1 0 0 0 0
Script<-!>

Formula

>
			 17 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select a hotspot or choose Create - Hotspot - Popup Formula or Programmable. Click Script (Programmable only) o
r Formula for Run. If you click Script, select Click, Initialize, or Terminate for Event. To activate, click the hotspot text.

>
			 18 0 0 0 0 0 0 1 0 0 0 0
Navigator design

>
			 18 1 0 0 0 0 0 1 0 0 0 0
Button<:X8,0;Index "Button script or formula" # "where used">

>
			 18 2 0 0 0 0 0 1 0 0 0 0
Script<-">

Formula

>
			 18 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Navigators. Double-click the navigator, or choose Create - Design - Navigator. Select a button or choose Create - Button. Click Script or Formula for Run. To activate, choose View - Navigators - NameOfNavigator and 
select the button.

>
			 19 1 0 0 0 0 0 1 0 0 0 0
Hotspot<:X8,0;Index "Hotspot script or formula" # "where used">

>
			 19 2 0 0 0 0 0 1 0 0 0 0
Script<-">

Formula

>
			 19 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Navigators. Double-click the navigator, or choose Create - Design - Navigator. Select a hotspot or choose Create - Hotspot - Rectangle or Polygon. Click Script or Formula for Run. To activate, choose View - Navigato
rs - NameOfNavigator and select the hotspot.

>
			 20 0 0 0 0 0 0 1 0 0 0 0
Field design

>
			 20 1 0 0 0 0 0 1 0 0 0 0
Default value formula for editable field<:X8,0;Index "Default value formula" # "where used">

>
			 20 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 20 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select the field or choose Create - Field. Select Default Value for Event. Activated when the document is creat
ed.

>
			 21 1 0 0 0 0 0 1 0 0 0 0
Input translation formula<:X8,0;Index "Input translation formula" # "where used"> for editable field

>
			 21 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 21 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select the field or choose Create - Field. Select Input Translation for Event. Activated when the field is clos
ed.

>
			 22 1 0 0 0 0 0 1 0 0 0 0
Input validation formula<:X8,0;Index "Input validation formula" # "where used"> for editable

>
			 22 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 22 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select the field or choose Create - Field. Select Input Validation for Event. Activated when the field is close
d.

>
			 23 1 0 0 0 0 0 1 0 0 0 0
Value formula<:X8,0;Index "Computed field formula" # "where used"> for computed field

>
			 23 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 23 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select the field or choose Create - Field. Select Value for Event. Activated when the field is closed.

>
			 24 1 0 0 0 0 0 1 0 0 0 0
Keyword field formula<:X8,0;Index "Keyword field formula" # "where used">

>
			 24 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 24 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Double-click the field, or choose Create - Field. Select "Use formula for choices" for Choices. Activated when 
the field is edited.

>
			 25 1 0 0 0 0 0 1 0 0 0 0
Event script<:X8,0;Index "Event script" # "where used">

>
			 25 2 0 0 0 0 0 1 0 0 0 0
Script

>
			 25 3 0 0 0 0 0 1 0 0 0 0
To design, choose View - Design and click Forms (or Subforms). Double-click the form (or subform), or choose Create - Design - Form (or Subform). Select the field or choose Create - Field. Select Entering, Exiting, Recalc, Initialize, or Terminate for Event
. Activated when the event occurs.

>
			 26 0 0 0 0 0 0 1 0 0 0 0
Rich text field

>
			 26 1 0 0 0 0 0 1 0 0 0 0
Button<:X8,0;Index "Button script or formula" # "where used">

>
			 26 2 0 0 0 0 0 1 0 0 0 0
Script<-!>

Formula

>
			 26 3 0 0 0 0 0 1 0 0 0 0
To design, enter a rich text field in edit mode. Select the button and choose Button - Edit Button, or choose Create - Hotspot - Button. Click Script or Formula for Run. If you click Script, select Click, Initialize, or Terminate for Event. To activate, cli
ck the button.

>
			 27 1 0 0 0 0 0 1 0 0 0 0
Hotspot<:X8,0;Index "Hotspot script or formula" # "where used">

>
			 27 2 0 0 0 0 0 1 0 0 0 0
Script<-!>

Formula

>
			 27 3 0 0 0 0 0 1 0 0 0 0
To design, enter a rich text field in edit mode. Select the hotspot and choose Hotspot - Edit Hotspot or choose Create - Hotspot - Formula Popup or Action Hotspot. Click Script (Action Hotspot only) or Formula for Run. If you click Script, select Click, Ini
tialize, or Terminate for Event. To activate, click the hotspot text. 

>
			 28 1 0 0 0 0 0 1 0 0 0 0
Section title formula<:X8,0;Index "Section title formula" # "where used">

>
			 28 2 0 0 0 0 0 1 0 0 0 0
Formula

>
			 28 3 0 0 0 0 0 1 0 0 0 0
To design, enter a rich text field in edit mode. Select a standard section, or choose Create - Section - Standard and select the new standard section. Choose Section - Section Properties and click Formula. Activated when a document based on the form is open
ed.

>
			 29 0 0 0 0 0 4096 0 0 0 0 0
			 29 1 0 0 0 0 4096 1 0 0 0 0
Hidden paragraph<:X8,0;Index "Hidden paragraph formula" # "where used">

>
			 29 2 0 0 0 0 4096 1 0 0 0 0
Formula

>
			 29 3 0 0 0 0 4096 1 0 0 0 0
To design, enter a rich text field in edit mode. Choose Text - Text Properties, click the window blind, and select "Hide Paragraph if formula is true." Activated when text is accessed.

>
		[e]
	[tble]
[frm]
	20
	1573060
	720
	5323
	8304
	8808
	0
	1
	1
	1 0 0 0 0 0 0
	0
	16777215
	6
	1
	0
	20992 12288
	[frmlay]
		7123
		7584
		1
		0
		0
		1
		5323
		0
		0
		2
		0
		1
		1
		0
		1
		864
		9062
		0
	[tbl]
		 12 3 0 86 2732 86 1 43 43
		[h]
			 0 210 86 2 0 3 0
			 1 200 86 2 0 3 0
			 2 200 86 2 0 3 0
			 3 200 86 2 0 3 0
			 4 200 86 2 0 3 0
			 5 200 86 2 0 3 0
			 6 200 86 2 0 3 0
			 7 200 86 2 0 3 0
			 8 200 86 2 0 3 0
			 9 200 86 2 0 3 0
			 10 200 86 2 0 3 0
			 11 200 86 2 0 3 0
		[e]
		[w]
			 0 890 86 2 0
			 1 1516 86 2 0
			 2 4877 86 2 0
		[e]
		[data]
			 0 0 0 0 0 0 8704 1 0 0 0 0
@Table col hd@Sequence

>
			 0 1 0 0 0 0 4352 1 0 0 0 0
@Table col hd@Event

>
			 0 2 0 0 0 0 4352 1 0 0 0 0
@Table col hd@Objects and actions

>
			 1 0 8 0 0 0 0 1 0 0 0 0
<+@>1

>
			 1 1 0 0 0 0 0 1 0 0 0 0
Initialize

>
			 1 2 0 0 0 0 0 1 0 0 0 0
Form (document) when it is opened

>
			 2 0 8 0 0 0 0 1 0 0 0 0
<+@>2

>
			 2 1 0 0 0 0 0 1 0 0 0 0
Initialize

>
			 2 2 0 0 0 0 0 1 0 0 0 0
Field, action, agent, button, or hotspot when form is opened

>
			 3 0 8 0 0 0 0 1 0 0 0 0
<+@>3

>
			 3 1 0 0 0 0 0 1 0 0 0 0
Opening

>
			 3 2 0 0 0 0 0 1 0 0 0 0
Form (document) when it is opened

>
			 4 0 8 0 0 0 0 1 0 0 0 0
<+@>4

>
			 4 1 0 0 0 0 0 1 0 0 0 0
Click

>
			 4 2 0 0 0 0 0 1 0 0 0 0
Action, button, or hotspot when it is selected

>
			 5 0 8 0 0 0 0 1 0 0 0 0
<+@>4

>
			 5 1 0 0 0 0 0 1 0 0 0 0
Recalc

>
			 5 2 0 0 0 0 0 1 0 0 0 0
Field when form is refreshed (View - Refresh)

>
			 6 0 8 0 0 0 0 1 0 0 0 0
<+@>4

>
			 6 1 0 0 0 0 0 1 0 0 0 0
Entering

>
			 6 2 0 0 0 0 0 1 0 0 0 0
Field when it is entered in edit mode

>
			 7 0 8 0 0 0 0 1 0 0 0 0
<+@>5

>
			 7 1 0 0 0 0 0 1 0 0 0 0
Exiting

>
			 7 2 0 0 0 0 0 1 0 0 0 0
Field when it is exited in edit mode

>
			 8 0 8 0 0 0 0 1 0 0 0 0
<+@>6

>
			 8 1 0 0 0 0 0 1 0 0 0 0
Recalc

>
			 8 2 0 0 0 0 0 1 0 0 0 0
Field when closing form if the field changed since last recalc

>
			 9 0 8 0 0 0 0 1 0 0 0 0
<+@>7

>
			 9 1 0 0 0 0 0 1 0 0 0 0
Closing

>
			 9 2 0 0 0 0 0 1 0 0 0 0
Form (document) when it is closed

>
			 10 0 8 0 0 0 0 1 0 0 0 0
<+@>8

>
			 10 1 0 0 0 0 0 1 0 0 0 0
Terminate

>
			 10 2 0 0 0 0 0 1 0 0 0 0
Form (document) when it is closed

>
			 11 0 8 0 0 0 4096 1 0 0 0 0
<+@>9

>
			 11 1 0 0 0 0 4096 1 0 0 0 0
Terminate

>
			 11 2 0 0 0 0 4096 1 0 0 0 0
Field, action, agent, button, or hotspot when form is closed

>
		[e]
	[tble]
[lay]
	Standard
	3079
	[rght]
		12960
		10166
		1
		960
		1200
		3
		960
		720
		0
		1
		0
		1
		0
		2
		1
		960
		9446
		1
		1
		3120
	[lft]
		12960
		10166
		1
		720
		1200
		3
		960
		960
		0
		1
		0
		1
		0
		2
		1
		720
		9206
		1
		1
		3120
	[hlft]
	[lyfrm]
		1
		3008
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		3
	[frmlay]
		960
		10166
		1
		720
		180
		3
		0
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		1
		2
		4674
	[txt]
>
	[hrght]
	[lyfrm]
		1
		11200
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		1
	[frmlay]
		960
		10166
		1
		960
		180
		3
		0
		720
		0
		1
		0
		1
		1
		0
		1
		960
		9446
		1
		2
		4674
	[txt]
>
	[flft]
	[lyfrm]
		1
		5056
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		4
	[frmlay]
		12960
		10166
		1
		720
		480
		3
		11940
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		1
		3
		9900
	[txt]
@Left pg foot@<:R1,1,3,8460,><:P19999,0,1-> Programmer's Guide	Lotus Confidential

>
	[frght]
	[lyfrm]
		1
		13248
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		2
	[frmlay]
		12960
		10166
		1
		900
		480
		3
		11940
		780
		0
		1
		0
		1
		1
		0
		1
		900
		9386
		1
		3
		9900
	[txt]
@Right pg foot@<:R1,1,3,8486,>Lotus Confidential	About Scripts and Formulas <:P19999,0,1->

>
[elay]
[l1]
	0
[pg]
	20
	14 0 5 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 3 0 0
	14 0 5 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 3 8 0 0
	14 0 5 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 11 7 0 0
	14 0 5 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 18 8 0 0
	28 509 102 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	51 120 72 0 64 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	66 399 42 32 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	82 0 9 0 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	106 0 9 32 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	117 0 9 32 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	145 0 90 32 0 0 0 200 2 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	170 0 0 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	201 0 9 0 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	230 0 9 32 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	260 0 73 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	294 0 9 0 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	308 0 81 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	337 0 9 0 1 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	363 0 109 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	375 5 1 1025 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
[edoc]
@Ahead@<:#240,8486><:f280,,><+!>1. About Scripts and Formulas<-!><:f>

<:s><:#200,8486>

<:#1400,8486><:X8,-32768;Index "Script" # "described">Scripts and formulas<:X8,-32768;Index "Formula" # "described"> provide an integral programming interface to Lotus Notes</n>. You write scripts using the LotusScript<:X8,-32768;Index " LotusScript" #><:f120,BArial,0,0,0>
<+&>TM<-&><:f> programming language and you write formulas using the Notes formula language, which employs @functions and @commands. You attach scripts and formulas to various objects in Notes depending on need and desire. For example, if you create a compu
ted field in a form, you would attach a formula to compute a value for the field. Or you might decide to create an agent to automatically update all the documents in a database at scheduled times. You could write such an agent as a script or a formula.

@See also prnt@<:#200,8486>For a scripting tutorial, see Appendix A.

@See also prnt@<:s><:#800,8486>The <+">Application Developer's Guide<-"> and the <+">Database Manager's Guide<-"> provide templates and examples for the common cases where you use scripts and formulas. For these cases, you do not have to learn LotusScript or the formula language. Beyond 
these cases, refer to this manual for complete guidelines and reference material for using scripts and formulas.

@Ahead@<:s><:#240,8486>Where to use scripts and formulas

<:#600,8486><:X8,-32768;Index "Script" # "where to use"><:X8,-32768;Index "Formula" # "where to use"><:X8,-32768;Index "Scripts" # "versus formulas"><:X8,-32768;Index "Formulas" # "versus scripts">You attach LotusScript scripts and Notes formulas to various objects in 
Notes. The particular object determines what you can use. For some objects, both scripts and formulas can be used. For some objects, only one or the other can be used.

<:s><:#200,8486>Scripts and formulas differ as follows:

@Bullet@<:#600,8486>LotusScript is a full object-oriented programming language. Its interface to Notes is through predefined object classes. Notes oversees the compilation and loading of user scripts and automatically includes the Notes class definitions.

@Bullet@<:#600,8486>Notes formulas are expressions that have program-like attributes. For example, you can assign values to variables and use a limited control logic. The formula language interface to Notes is through calls to @functions.

<:#1200,8486>In general, formulas are best used for working within the object that the user is currently processing, for example, to return a default value to a field or determine selection criteria for a view. Scripts are best used for accessing existing objects, for e
xample, to change a value in one document based on values in other documents. Scripts provide some capabilities that formulas do not such as the ability to manipulate a database's access control list (ACL). Formulas provide better performance in some situat
ions and may be more convenient for simple applications.

<:#600,8486><+"><+!>yyReviewers: this is all I have for formulas v. LotusScript right now. If anyone has guidelines on when to use one or the other, please note. The major interest areas are probably performance & ease-of-use.<-!><-">

<:#600,8486>The following table outlines the programmable objects<:X8,-32768;Index "Programmable objects" #><:X8,-32768;Index "Objects" #><:X8,-32768;Index "Scope of programmable objects" #> in Notes. The third column specifies whether the object supports scripts, form
ulas, or both. The fourth column shows you where in the Notes user interface to design and activate the scripts and formulas.

<:s><:t0>

@Ahead@<:#240,8486><-!><-!>Writing <+,>Formulas for <-,>S<+,>m<-,>artIcons

<:#800,8486>SmartIcons<:X8,-32768;Index "SmartIcon formula" #> are buttons that execute a formula when you click them. Notes comes with over 100 predefined SmartIcons, including icons for most Notes menu commands. Notes also includes over a dozen custom SmartIcons to w
hich you can assign your own formulas. SmartIcons are associated with each user's workspace--they are not associated with databases and are not shared among users.

@See also prnt@<:#200,8486>For information on the user interface, see "SmartIcons" in Help.

@See also prnt@<:#200,8486>A SmartIcons formula runs on the user's workstation.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>SmartIcons<-)><+*>H_SMARTICONS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}See examples<-)><+*>H_EXAMPLES_WRITING_FORMULAS_FOR_SMARTICONS<-*>

@Chead title@<:s><:#200,8486>Examples: writing formulas for SmartIcons

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>The following SmartIcons formula opens the <++>names.nsf<-+> database on the 
<++>doc<-+> server to the People view:

@Mono@<+@><:I0,0,0,0><:#200,8486><:f180,,0,0,0>@Command(<[>FileOpenDatabase]; "doc" : "names.nsf"; "People")<:f>

@Dhead@<:s><:#200,8486>Example 2

<:#1600,8486>The following SmartIcons formula presents the user with the list of databases in a database catalog, and opens the database that the user selects. The first @DbColumn puts a list of the values in column 4 of the Databases by _Replica ID view in the temporar
y variable titles. The second @DbColumn puts a list of the values in column 2 of the Databases by _Replica ID view in the temporary variable servers. The third @DbColumn puts a list of the values in column 3 of the Databases by _Replica ID view in the tempo
rary variable databases. The temporary variable list combines titles, servers, and databases for presentation to the user in @Prompt. The formula then parses the return value from @Prompt into a server name and database name for inclusion in the FileOpenDat
abase @command.

@Mono@<:#2200,8486><:f180,,0,0,0>titles := @DbColumn(""; "doc":"catalog.nsf"; "Databases by _Replica ID"; 4);<**><:f><:f180,,0,0,0>servers := @DbColumn(""; "doc":"catalog.nsf"; "Databases by _Replica ID"; 2);<**><:f><:f180,,0,0,0>databases := @DbColumn(""; "doc":"catalog.nsf"
; "Databases by _Replica ID"; 3);<**><:f><:f180,,0,0,0>list := titles + " *-* " + servers + " *:* " + databases;<**><:f><:f180,,0,0,0>member := @Prompt(<[>OKCANCELLIST]; "Open Database"; "Select a database"; ""; list);<**><:f><:f180,,0,0,0>server := @Left(@
Right(member; " *-* "); " *:* ");<**><:f><:f180,,0,0,0>database := @Right(member; " *:* ");<**><:f><:f180,,0,0,0>@Command(<[>FileOpenDatabase]; server:database)

@Ahead@<:s><:#240,8486>Writing <+,>Replication Formu<-,>las

<:#400,8486>A replication formula<:X8,-32768;Index "Replication formula" #> selects the documents that will be pulled into the current database during replication.

@See also prnt@<:#400,8486>For information on the user interface, see "Replication" in Help and in Chapter 
<+"><+!>N<-"><-!> of the <+">Database Manager's Guide<-">.

<:#600,8486><:X8,-32768;Index "SELECT keyword" #>A replication formula must end with a 
<+)>SELECT statement<-)><+*>H_SELECT_<-*>KEYWORD. If the last statement in the formula is a logical expression, Notes turns it into a SELECT statement by prepending the keyword SELECT.

<:#200,8486>A replication formula runs on the server or workstation containing the formula's database.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Replication<-)><+*>H_REPLICATION<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_REPLICATION_FORMULAS<-*>

@Chead title@<:s><:#200,8486>Examples: writing replication formulas

@Dhead@<:s><:#200,8486>Example 1

<:#200,8486><:X8,-32768;Index "@All" #>The default replication formula for a database replicates all documents.

@Mono@<:#200,8486>SELECT @All

@Dhead@<:s><:#200,8486>Example 2

<:s><:#200,8486>The following formula replicates only documents containing East in the Region field.

@Mono@<:#200,8486>SELECT Region = "East"

@Dhead@<:s><:#200,8486>Example 3

<:#400,8486>The following formula, which would be useful in a replica of a mail database, does not replicate documents whose From field is Arnold Runon or Mary Chen.

@Mono@<:#200,8486>SELECT !(From="Arnold Runion" | From="Mary Chen")

@Ahead@<:s><:#240,8486>Writing <+,>Scripts and Formulas for Agents<-,>

<:#800,8486>An <:X8,-32768;Index "Agent script or formula" #>agent is a user procedure that you can trigger through a number of mechanisms including a menu command, a preset schedule, the arrival of mail, and the pasting of documents. You can write scripts and formulas
 to create agents, and you can use Notes-supplied agents. Before writing your own agent, see if a Notes-supplied agent will do the job.

<:#1000,8486><:X8,-32768;Index "SELECT keyword" #><:f><:X8,-32768;Index "@All" #><:f>Formula-based agents run iteratively on the documents in the database. You can apply search criteria to specify which documents in the database are to be processed. A 
<+)>SELECT statement<-)><+*>H_SELECT_<-*>KEYWORD in the formula further limits the search. If you do not include a SELECT statement in the formula, Notes appends a "SELECT @All" statement. Except for "SELECT @All," a SELECT statement must be the first state
ment in the formula to be effective.

<:s><:#400,8486>Script-based agents run once and have no associated search criteria. You supply the search criteria and the iteration through the language constructs.

@See also prnt@<+@><:#400,8486>For Information on the user interface, see "Agents" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also prnt@<+@><:#200,8486>An agent runs on:

@Bullet@<+@><:#400,8486>The user's workstation if the agent's trigger is: Manually, If Document Has Been Modified, If Documents Have Been Pasted.

@Bullet@<+@><:#200,8486>The server or workstation containing the agent's trigger is: If New Mail Has Arrived, On Schedule.

@See also btn@<+@><:#200,8486>

@Crossref@<+@><:#200,8486><+)>Agents<-)><+*>H_AGENTS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#400,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_SCRIPTS_AND_FORMULAS_FOR_AGENTS<-*>

@Chead title@<:s><:#200,8486>Examples: writing scripts and formulas for agents

@Dhead@<:s><:#200,8486>Example 1

<:#600,8486>The following script writes a value to the Category field based on a value in the Sales field of each document in the database. Compare with Example 2, which uses a formula solution. The script example requires more lines of code but includes the algorithm 
for finding the documents being processed.

@Mono@<:#3600,8486>Sub INITIALIZE<**>     Dim db As New NotesDatabase("", "ch1agent")<**>     Set dc = db.AllDocuments<**>     For j = 1 To dc.Count<**>          Set doc = dc.GetNthDocument(j)<**>          categoryValues = doc.Category<**>          salesValues = doc.Sales<**>
          Select Case salesValues(0)<**>          Case Is <;>= 200000 : categoryValues(0) = "Above Quota"<**>          Case Is <;>= 100000 : categoryValues(0) = "OK"<**>          Case Else : categoryValues(0) = "Below Quota"<**>          End Select<**>     
     doc.Category = categoryValues<**>          Call doc.Save(True, False)<**>     Next<**>     Set v = db.GetView("Main View")<**>     v.Refresh<**>End Sub

@Dhead@<:s><:#200,8486>Example 2

<:#1000,8486>The following formula writes a value to the Category field based on a value in the Sales field of each document in the database, assuming that all documents are selected for processing. Compare with Example 1, which uses a script solution. The formula execu
tes once on each document selected by combining outside criteria with the SELECT statement. Data declarations are implicit and formula syntax is cryptic making for compact source code.

@Mono@<:#600,8486>FIELD category := @If(sales <;>= 200000; "Above Quota"; sales <;>= 100000; "OK"; "Below Quota");<**>SELECT @All

@Mono@<:#200,8486><+"><+!>yyrevise <-!><-"><+!><+">this or add example showing SELECT at beginning<-!><-">

@Dhead@<:s><:#200,8486>Example 3

<:#1200,8486>The following script finds the sum of all Order_Total fields in a database for one day, and writes a new record to the database containing the daily total. Each record in the database has Order_Number, Date, and Order_Total fields. The script finds all the 
documents in the database, then uses a loop and a comparison of dates to limit processing to today's documents. For each document, the script adds the Order_Total to a dailyTotal variable. The script places the words "DAILY TOTAL" in the Order_Number field 
for the document that it writes, and places the dailyTotal value in the Order_Total field.

@Mono@<:#4000,8486>Sub INITIALIZE<**>     Dim db As New NotesDatabase("", "ch1sales.nsf")<**>     Set dc = db.AllDocuments<**>     dailyTotal = 0<**>     For j = 1 To dc.Count<**>          Set doc = dc.GetNthDocument(j)<**>          odate = doc.Date<**>          dn = Datenumb
er(Year(odate(0)), Month(odate(0)), Day(odate(0)))<**>          orderNumber = doc.Order_Number<**>          If dn = Today And orderNumber(0) <<<;> "DAILY TOTAL" Then<**>               orderTotal = doc.Order_Total<**>               dailyTotal = dailyTotal + 
orderTotal(0)<**>          End If<**>     Next<**>     Dim docNew As New NotesDocument(db)<**>     Set itm = docNew.AppendItemValue("Order_Number", "DAILY TOTAL") 
<**>     Set itm = docNew.AppendItemValue("Order_Total", dailyTotal)<**>     Set itm = docNew.AppendItemValue("Date", Date$() + " " + Time$())<**>     Call DocNew.Save(True, False)<**>End Sub

@Ahead@<:#240,8486>Writing <+,>Scripts and Formulas for Actions<-,>

<:#600,8486>An action<:X8,-32768;Index "Action script or formula" #> is a custom procedure that you can associate with a view or form. When you open the view or open a document based on the form, the action becomes available as a menu command under Actions and/or as a 
button on an action bar.

<:#400,8486>You can conditionally suppress availability of an action on the menu or action bar with a "Show action" formula. Availability is suppressed if the formula evaluates to false.

@See also prnt@<:#400,8486>For Information on the user interface, see  "Actions" in Help or in Chapter 
<+!><+">N<-"><-!> of the <+">Application Developer's Guide<-">.

@See also prnt@<:#200,8486>Actions run on the user's workstation.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Action<-)><+)>s<-)><+*>H_ACTIONS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#400,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_SCRIPTS_AND_FORMULAS_FOR_ACTIONS<-*>

@Chead title@<:#200,8486>Examples: writing scripts and formulas for actions

@Dhead@<:#200,8486>Example 1

<:#600,8486>The following script prints the name of each Notes database in the Notes data directory on the computer running the script. The FirstDatabase and NextDatabase methods of NotesDbDirectory walk through all the databases for the specified server where null def
aults to the current computer.

@Mono@<+@><:#1800,8486>Sub CLICK(SOURCE As BUTTON)<**>  Dim Srv As New NotesDbDirectory("")<**>  Dim Db as NotesDatabase<**>  Set Db = Srv.FirstDatabase(ANYNSF)<**>  While Not(Db Is Nothing)<**>    Print Db.Title<**>    Set Db = Srv.NextDatabase()<**>  Wend<**>End sub

@Dhead@<:#200,8486>Example 2

<:#800,8486>The following formula lists the names in the Name & Address Book on the CORP1 server, lets the user select any number of names, combines the selected names into a string using a comma and a space to separate names, and inserts the string into the current fi
eld. This action works best when the user is in the SendTo field of a mail database.

@Mono@<:#1200,8486>Last := @DbColumn(""; "CORP1" : "names.nsf"; "People"; 1);<**>First := @DbColumn(""; "CORP1" : "names.nsf"; "People"; 2);<**>List := First + " " + Last;<**>Name := @Prompt(<[>OKCANCELLISTMULT]; "Send To"; "Who are you sending this memo to?"; ""; List);<**>@
Command(<[>EditInsertText]; @Implode(Name; ", "))

@Dhead@<:#200,8486>Example 3

<:#400,8486>The following formula  is a "Show action" formula. The action becomes available on the form menu or action bar only if the field Order_Total exceeds 100.

@Mono@<:#200,8486>Order_Total <;> 100

@Ahead@<:#240,8486>Writing <+,>Scripts and Formulas for Buttons and<-,><+,> Hotsp<-,>ots

<:#200,8486>In form design, in navigator design, and in rich text fields, you can create buttons and hotspots.

@Bullet@<:#200,8486><+)>Writing a b<-)><+)>utton<-)><+)> script or<-)><+)> formula<-)><+*>H_WRITING_A_BUTTON_SCRIPT_OR_FORMULA<-*>

@1st lev para@<:#200,8486>A button<:f,,> executes a script or formula when you click it.

@Bullet@<:#200,8486><+)>Writing a h<-)><+)>otspot<-)><+)> script or<-)><+)> formula<-)><+*>H_WRITING_A_HOTSPOT_SCRIPT_OR_FORMULA<-*>

@1st lev para@<:#200,8486>A hotspot<:f,,> is highlighted text that performs an action when you click it.

<:f,,>A button or hotspot runs on the user's workstation.

@Bhead title@<:#220,8486>Writing a button <+,>Script or Formula<-,>

<:#200,8486>A button<:X8,-32768;Index "Button script or formula" #> executes a script or formula when you click it.

@See also prnt@<:#200,8486>For Information on the user interface, see "Buttons" in Help.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Buttons<-)><+*>H_BUTTONS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_BUTTON_SCRIPT_OR_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a button script or formula

@Dhead@<:s><:#200,8486>Example 1

<:#800,8486>The following button script is useful in a mail message to a group of persons. When the recipient clicks the button, the script sends a mail message indicating "Yes" or "No" for the "RSVP." For testing the name of the current user is used--in practice, you 
would use your name. Compare with Example 2, which uses a formula solution.

@Mono@<:#200,8486><:f180,,0,0,0>(Declarations)

@Mono@<:#400,8486><:f180,,0,0,0>%INCLUDE "lsconst.lss"<**><:f>

@Mono@<:#2000,8486><:f180,,0,0,0>Sub CLICK(SOURCE As BUTTON)<**><:f><:f180,,0,0,0>     Dim s As New NotesSession()<**><:f><:f180,,0,0,0>     Dim db As New NotesDatabase("", "")<**><:f><:f180,,0,0,0>     Dim doc As New NotesDocument(db)<**><:f><:f180,,0,0,0>     yesno = Messag
ebox("Do you want to attend?", MB_YESNO+MB_ICONQUESTION)<**><:f><:f180,,0,0,0>     If yesno = IDYES Then rsvp = "Yes" Else rsvp = "No"<**><:f><:f180,,0,0,0>     Call doc.AppendItemValue("Subject", "RSVP")<**><:f><:f180,,0,0,0>     Call doc.AppendItemValue("
Body", rsvp)<**><:f><:f180,,0,0,0>     Call doc.SendTo(s.UserName, True)<**><:f><:f180,,0,0,0>End Sub

@Dhead@<:s><:#200,8486>Example 2

<:#800,8486>The following button script is useful in a mail message to a group of persons. When the recipient clicks the button, the script sends a mail message indicating "Yes" or "No" for the "RSVP." For testing the name of the current user is used--in practice, you 
can use your name. Compare with Example 1, which uses a script solution.

@Mono@<:#600,8486><:f180,,0,0,0>yesno := @Prompt(<[>YESNO]; "RSVP"; "Do you want to attend?");<**><:f><:f180,,0,0,0>rsvp := @If(yesno; "Yes"; "No");<**><:f><:f180,,0,0,0>@MailSend(@UserName; ""; ""; "RSVP"; ""; rsvp; "")

@Dhead@<:s><:#200,8486>Example 3

<:#800,8486>The following button script displays the sum of all Order_Total fields in a database for one day. Each record in the database has Order_Number, Date, and Order_Total fields. The script finds all the documents in the database, then uses a loop and a comparis
on of dates to limit processing to today's documents. For each document, the script adds the Order_Total to a dailyTotal variable.

@Mono@<:#3200,8486><:f180,,0,0,0>Sub CLICK(SOURCE As BUTTON)<**><:f><:f180,,0,0,0>     Dim db As New NotesDatabase("", "ch1sales.nsf")<**><:f><:f180,,0,0,0>     Set dc = db.AllDocuments<**><:f><:f180,,0,0,0>     dailyTotal = 0<**><:f><:f180,,0,0,0>     For j = 1 To dc.Count<**>
<:f><:f180,,0,0,0>          Set doc = dc.GetNthDocument(j)<**><:f><:f180,,0,0,0>          odate = doc.Date<**><:f><:f180,,0,0,0>          dn = Datenumber(Year(odate(0)), Month(odate(0)), Day(odate(0)))<**><:f><:f180,,0,0,0>          orderNumber = doc.Order_
Number<**><:f><:f180,,0,0,0>          If dn = Today And orderNumber(0) <<<;> "DAILY TOTAL" Then<**><:f><:f180,,0,0,0>               orderTotal = doc.Order_Total<**><:f><:f180,,0,0,0>               dailyTotal = dailyTotal + orderTotal(0)<**><:f><:f180,,0,0,0>
          End If<**><:f><:f180,,0,0,0>     Next<**><:f><:f180,,0,0,0>     Print Format(dailyTotal, "Currency")<**><:f><:f180,,0,0,0>End Sub

@Dhead@<:#200,8486>Example 4

<:#400,8486>The following button formula is part of a navigator. The script prompts the user and opens a view selected by the user.

@Mono@<:#600,8486>view := @Prompt(<[>OKCANCELLIST]; "Which view do you want to open?"; ""; ""; "By first name" : "By last name");<**>@Command(<[>OpenView]; view)

@Bhead title@<:#220,8486>Writing a hotspot <+,>Script or<-,><+,> Formula<-,>

<:#400,8486>A hotspot<:X8,-32768;Index "Hotspot script or formula" #> is highlighted text that performs an action when you click it. The available actions are: pop-up text, pop-up text from a formula, go to a link, run a formula, and run a script.

@See also prnt@<:#200,8486>For Information on the user interface, see "Hotspots" in Help.

<:#200,8486>A formula for "pop-up text from a formula<:X8,-32768;Index "Pop-up text from a formula" #>" must evaluate to a text string.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Hotspot<-)><+)>s<-)><+*>H_HOTSPOTS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_WRITING_A_HOTSPOT_SCRIPT_OR_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a hotspot script or formula

@Dhead@<:s><:#200,8486>Example 1

<:s><:#800,8486>The examples shown for buttons can also be used for hotspots written as scripts and "run a formula" formulas. For example, you can have a button named "Daily Sales Total" that displays the daily sales total when clicked, or you can highlight as a hotspot te
xt such as "Click here for daily sales total" that runs the same script or formula.

@Dhead@<:s><:#200,8486>Example 2

<:#600,8486>The following example demonstrates the "pop-up text from a formula" formula. You can highlight as a hotspot the following text in a form: "Please note your user name and the current date and time." The formula associated with the hotspot would evaluate to a
 text string containing the necessary information.

@Mono@<:#400,8486>"Your user name is " + @UserName + @NewLine + "The date and time are " + @Text(@Now)

@Ahead@<:#240,8486>Writing <+,>Form, Selection, and Column For<-,>mulas

<:#200,8486>As part of the view design process, you specify form, selection, and column formulas.

@Bullet@<:#200,8486><-!><-!><+)>Writing a f<-)><+)>orm formula<-)><+*>H_WRITING_A_FORM_FORMULA<-*>

@1st lev para@<:#400,8486>A form formula<:f,,> determines which forms are used for composing and displaying documents under different conditions.

@Bullet@<:#200,8486><-!><+)>Writing a s<-)><+)>election<-)><+)> formula<-)><+*>H_WRITING_A_SELECTION_FORMULA<-*>

@1st lev para@<:#200,8486>A selection formula<:f,,> selects the documents that appear in a view.

@Bullet@<:#200,8486><+)>Writing a c<-)><+)>olumn<-)><+)> formula<-)><+*>H_<-*>WRITING_A_COLUMN_FORMULA

<:#200,8486>A <:f,,>column formula determines what is displayed in a column of a view.

<:#200,8486><:f,,>These formulas run as follows:

@Bullet@<:#200,8486><:f,,>A form formula runs on the user's workstation.

@Bullet@<:#200,8486><:f,,>A selection formula runs on the server or workstation containing the formula's database.

@Bullet@<:#200,8486><:f,,>A column formula runs on the server or workstation containing the formula's database.

@Bhead title@<:#220,8486><++>W<-+><+,>riting a fo<-,><+,>rm Form<-,>ula

<:#400,8486>A form formula<:X8,-32768;Index "Form formula" #> determines which forms are used for composing and displaying documents under different conditions.

<:s><:#200,8486>A form formula is optional. Notes selects a form in the following preference order:

@Numbered list@<:s><:#200,8486>Form stored in the document.

@Numbered list@<:s><:#200,8486>Form specified in the form formula.

@Numbered list@<:s><:#200,8486>Form with which the document was created.

@Numbered list@<:s><:#200,8486>Default form for the database.

<:s><:#200,8486>A form formula must evaluate to the name of a form.

@See also prnt@<:#400,8486>For Information on the user interface, see "Form Formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Form formulas<-)><+*>H_FORM_FORMULAS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_WRITING_A_FORM_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a form formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want new documents to be created using the "Open New Discussion" form and existing documents to be accessed using the "Main Topic" form, you can use the following formula.

@Mono@<:#200,8486>@If(@IsNewDoc; "Open New Discussion"; "Main Topic")

@Dhead@<:s><:#200,8486>Example 2

<:#1400,8486>The database for the following example has a form for each department in the company. The name of each form is the name of the department plus a space and the word "Report." The formula selects a form based on the value of the Department field of the Name &
 Address Book for the person writing or reading a document. The formula first parses the user name taking care to deal with distinguished names. The formula retrieves the Department and FirstName fields for the documents in the Name & Address Book that matc
h the last name of the user name. The formula uses @Member to locate the correct element in the FirstName list, and @Subset to isolate the corresponding element in the Department list.

@Mono@<:#1600,8486>u1 := @UserName;<**>u2 := @If(@Contains(u1; "/"); @Left(u1; "/"); u1);<**>first := @Left(u2; " ");<**>last := @Right(u2; " ");<**>deptList := @DbLookup(""; "":"xnames.nsf"; "People"; last; "Department");<**>firstList := @DbLookup(""; "":"xnames.nsf"; "Peopl
e"; last; "FirstName");<**>n := @Member(first; firstList);<**>@Subset(@Subset(deptList; n); -1) + " Report"

@Bhead title@<:#220,8486><++>W<-+><+,>riting a selection Formul<-,>a

<:#200,8486>A selection formula<:X8,-32768;Index "Selection formula" #> selects the documents that appear in a view.

<:#600,8486><:X8,-32768;Index "SELECT keyword" #>A selection formula must end with a 
<+)>SELECT statement<-)><+*>H_SELECT_KEYWORD<-*>. If the last statement in the formula is a logical expression, Notes turns it into a SELECT statement by prepending the keyword SELECT.

@See also prnt@<:#400,8486>For Information on the user interface, see "Selection Formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Selection f<-)><+)>ormulas<-)><+*>H_SELECTION_FORMULAS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp} <-)><+)>See examples<-)><+*>H_WRITING_A_SELECTION_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a selection formula

@Dhead@<:s><:#200,8486>Example 1

<:#200,8486><:X8,-32768;Index "@All" #>The default selection formula for a database is:

@Mono@<:#200,8486>SELECT @All

@Dhead@<:s><:#200,8486>Example 2

<:#200,8486><:f,,>The following example selects only documents based on the "Main" or "First response" form:<*(>

@Mono@<:#200,8486>SELECT Form="Main" | Form="First response"

@Dhead@<:s><:#200,8486>Example 3

<:#1200,8486>The following examples are from the mail template <++>mail.ntf<-+>. The first example is the selection formula for the Drafts By Category view; the documents selected for this view are those where both the DeliveredDate and PostedDate are not filled in (are
 null). The second example is the selection formula for the Sent By Category; the documents selected for this view are those where the PostedDate is filled in, but the DeliveredDate is not. The third example is the selection formula for the Received By Cate
gory view; in this case, either the DeliveredDate or the Date field is filled in.

@Mono@<:#200,8486>SELECT DeliveredDate = "" & PostedDate = ""

@Mono@<:#200,8486>SELECT DeliveredDate = "" & PostedDate != ""

@Mono@<:#200,8486>SELECT DeliveredDate != "" | Date != ""

@Bhead title@<:#220,8486><++>W<-+><+,>riting a column Formu<-,>la

<:#200,8486>A <:X8,-32768;Index "Column formula" #>column formula determines what is displayed in a column of a view.

<:s><:#200,8486>A column formula must evaluate to a text string.

@See also prnt@<:#400,8486>For Information on the user interface, see "Column formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Column f<-)><+)>ormulas<-)><+*>H_COLUMN_FORMULAS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_COLUMN_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a column formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want the contents of the Subject field to appear in the current column, you can specify the following formula.

@Mono@<:#200,8486>Subject

@Dhead@<:s><:#200,8486>Example 2

<:#600,8486><:X8,-32768;Index "DEFAULT keyword" #>The following formula specifies the column contents as the Subject field followed by a blank (or nothing if the Subject field is empty), followed by the From field in parentheses. By default, the From field contains the
 name of the author of the document.

@Mono@<:#400,8486>DEFAULT From := @Author;<**>@If(Subject != ""; Subject + " "; "") + "(" + From " ")"

@Dhead@<:s><:#200,8486>Example 3

<:#600,8486><:f,,>The following formula specifies the column contents as the number 1 for Weekdays forms and 2 for all other forms. If you make this column the first column, hidden, and sorted in ascending sequence, you force the Weekdays document (or documents) to the
 top of the view.

@Mono@<:#200,8486>@If(Form = "Weekdays"; 1; 2)

@Dhead@<:s><:#200,8486>Example 4

<:#400,8486><:f,,>The following formula reformats the contents of Person_Name to put the last name first followed by a comma, a space, and the first name.

@Mono@<:#400,8486>@If(@Contains(Person_Name; " "); @Right(Person_Name; " ") + ", " + @Left(Person_Name; " "); Person_Name)

@Dhead@<:s><:#200,8486>Example 5

<:#400,8486><:f,,>The following formula puts the name of the current weekday in the column, except that Saturdays and Sundays are treated as Fridays.

@Mono@<:#600,8486>T := @Weekday(@Now);<**>@If(T = 2; "Monday"; T = 3; "Tuesday"; T = 4; "Wednesday"; T = 5; "Thursday"; "Friday")

@Ahead@<:s><:#240,8486>Writing <+,>Window Title and Section Access Fo<-,>rmulas

<:s><:#200,8486>As part of the form design process, you specify window title and section access formulas.

@Bullet@<:#200,8486><-!><-!><-!><-!><+)>Writing a window title<-)><+)> formula<-)><+*>H_WRITING_A_WINDOW_TITLE_FORMULA<-*>

@1st lev para@<:#200,8486>A window title formula<:f,,> generates the text that appears in the title bar of documents using the form.

@Bullet@<:#200,8486><+)>Writing a s<-)><+)>ection access<-)><+)> formula<-)><+*>H_WRITING_A_SECTION_ACCESS_FORMULA<-*>

@1st lev para@<:#200,8486>A section access formula<:f,,> specifies the names of users who can edit the fields in the section.

<:#200,8486><:f,,>These formulas run on the user's workstation.<:f>

@Bhead title@<:#220,8486>Writing a w<+,>indow Title Formula<-,>

<:#200,8486>A window title formula<:X8,-32768;Index "Window title formula" #> generates the text that appears in the title bar of documents using the form.

<:s><:#400,8486>A window title formula must evaluate to a text or numeric value, except that a single field of any type is permissible.

<:s><:#200,8486>Rich text fields cannot be used in window title formulas.

@See also prnt@<:#400,8486>For Information on the user interface, see the "Window title formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Window t<-)><+)>itle<-)><+)> f<-)><+)>ormulas<-)><+*>H_WINDOW_TITLE_FORMULAS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_WINDOW_TITLE_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a window title formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want the title bar to display the static text "Focus Group Discussion," you can use the following formula.

@Mono@<:#200,8486>"Focus Group Discussion"

@Dhead@<:s><:#200,8486>Example 2

<:#600,8486>The following formula displays the static text "New Topic" for a new document. For an existing document, the formula displays the contents of the Subject field followed by text indicating the number of response documents associated with this document.

@Mono@<:#400,8486>@If(@IsNewDoc; "New Topic"; Subject +<**>@DocDescendents(" (No Responses)"; "(1 Response)"; "(% Responses)"))

@Dhead@<:s><:#200,8486>Example 3

<:#400,8486>The following formula displays a window title suited to a Response or a Response to Response document.

@Mono@<:#400,8486>@If(@IsNewDoc; "New Response to " + Subject;<**>"Response " + @DocNumber("") + " of " + @DocSiblings + " to " + Subject)

@Dhead@<:s><:#200,8486>Example 4

<:#200,8486>The following formula, which evaluates to a time-date value, is legal because it is a single field.

@Mono@<:#200,8486>@DateCreated;

@Dhead@<:s><:#200,8486>Example 5

<:#400,8486>In the following formula, the time-date field must be explicitly converted to text because it is part of an expression.

@Mono@<:#200,8486>"Response created on " + @Text(DateCreated)

@Bhead title@<:#220,8486>Writing a s<+,>ection Access Formula<-,>

<:#600,8486>A section access formula<:X8,-32768;Index "Section access formula" #> specifies the names of users who can edit the fields in the section. Other users only have read access to the section. However, this specification does not override the access control lis
t (ACL) for the database.

<:s><:#200,8486>A section access formula must evaluate to a name or a list of names.

@See also prnt@<:#400,8486>For Information on the user interface, see "Section access formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Section a<-)><+)>ccess<-)><+)> f<-)><+)>ormulas<-)><+*>H_SECTION_ACCESS_FORMULAS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_SECTION_ACCESS_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a section access formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want to restrict edit access to a section to Mary Chen and Donna Hill, you can use the following formula.

@Mono@<:#200,8486>"Mary Chen" : "Donna Hill"

@Dhead@<:s><:#200,8486>Example 2

<:#400,8486>The following formula restricts edit access to the section to those users listed in Column 1 of the By Person view of the current database.

@Mono@<:#200,8486>@DbColumn(""; ""; "By Person"; 1)

@Ahead@<:s><:#240,8486>Writing <+,>section title<-,> and hidden paragraph <+,>Formulas<-,>

<:s><:#400,8486>In form design and in rich text fields, you can use formulas to generate section titles and hide paragraphs.

@Bullet@<:#200,8486><+)>Writing a s<-)><+)>ection title formula<-)><+*>H_WRITING_A_SECTION_TITLE_FORMULA<-*>

@Bullet@<+)>H<-)><+)>idden paragraph formulas<-)><+*>H_WRITING_A_HIDDEN_PARAGRAPH_FORMULA<-*>

<:#200,8486>These formulas run on the user's workstation.

@Bhead title@<:#220,8486><++>W<-+><+,>riting a section title<-,> <+,>formula<-,>

<:#200,8486>The title for a collapsible section in a form or rich text field can be generated from a formula.<:X8,-32768;Index "Section title formula" #><:X8,-32768;Index "Collapsible section" #>

<:s><:#400,8486>A section title formula must evaluate to a text or numeric value, except that a single field of any type is permissible.

@See also prnt@<:#200,8486>For Information on the user interface, see "Collapsible sections" in Help.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486> <+)>Collapsible sections<-)><+*>H_COLLAPSIBLE_SECTIONS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_SECTION_TITLE_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a section title formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If Name has the value "Mary Chen," the following formula prints "Mary Chen's personal information" as the section title.

@Mono@<:#200,8486>Name + "\'s personal information"

@Bhead title@<:#220,8486><++>W<-+><+,>riting a h<-,><+,>idden<-,><+,> paragraph<-,> <+,>formula<-,>

<:#200,8486>A paragraph in a form or rich text field can be hidden (not displayed) if an associated formula is true.<:X8,-32768;Index "Hidden paragraph formula" #>

@See also prnt@<:#200,8486>For Information on the user interface, see "Hiding or displaying a paragraph" in Help.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Hiding or displaying a paragraph<-)><+*>H_HIDING_OR_DISPLAYING_A_PARAGRAPH<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_WRITING_A_HIDDEN_PARAGRAPH_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a hidden paragraph formula

@Dhead@<:s><:#200,8486>Example 1

<:#200,8486>The following formula hides a paragraph if the value of the Department field is not Sales.

@Mono@<:#200,8486>Department != "Sales"

@Ahead@<:s><:#240,8486>Writing <+,>Event Scripts<-,>

<:#1000,8486>An event script<:X8,-32768;Index " Event script" #> is a custom procedure that runs when an event associated with a<-!> form or field occurs. The 
<-!>form events are: <:f><:f,,><:X8,-32768;Index "Opening event" #>Opening<:f><:f,,>, 
<:f><:f,,><:X8,-32768;Index "Closing event" #>Closing<:f><:f,,>, <:X8,-32768;Index "Initialize event" #>Initialize<:f><:f,,>, 
<:f><:f,,>and <:X8,-32768;Index "Terminate event" #>Terminate<:f><:f,,>. The field events are: 
<:X8,-32768;Index "Entering event" #>Entering<:f><:f,,>, <:X8,-32768;Index "Exiting event" #>Exiting<:f><:f,,>, 
<:f><:f,,><:X8,-32768;Index "Recalc event" #>Recalc<:f><:f,,>, <:f><:f,,><:X8,-32768;Index "Initialize event" #>Initialize<:f><:f,,>, 
<:f><:f,,>and <:X8,-32768;Index "Terminate event" #>Terminate<:f><:f,,>. F<-!><:f><:f,,>orm and field objects are available through the Object menu in the LotusScript user interface. The events are available through the Item menu in the LotusScript user int
erface.

@See also prnt@<:#400,8486>For Information on the user interface, see  "Event scripts" in Help or in Chapter 
<+!><+">N<-"><-!> of the <+">Application Developer's Guide<-">.

@See also prnt@<:#200,8486>Event scripts run on the user's workstation.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Action<-)><+)>s<-)><+*>H_EVENT_SCRIPTS<-*>

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_EVENT_SCRIPTS<-*>

@Chead title@<:s><:#200,8486>Examples: writing event scripts

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>The following script executes when the user exits from a document. The script displays a message if the document is in edit mode.

@Mono@<:#1400,8486>Sub Closing(Source As Form)<**>     Dim workspace As New NotesUIWorkspace<**>     Set doc = workspace.CurrentDocument<**>     If doc.EditMode Then<**>          Messagebox("Call Pat at x-314 if you have any questions.")<**>     End If<**>End Sub

@Dhead@<:s><:#200,8486>Example 2

<:#400,8486>The following event script executes when the user enters the FullName field. The script fills in the FullName field by concatenating the FirstName field, a space, and the LastName field.

@Mono@<:#1600,8486>Sub Entering(Source As Field)<**>     Dim workspace As New NotesUIWorkspace<**>     Set doc = workspace.CurrentDocument<**>     firstName = doc.FieldGetText("FirstName")<**>     lastName = doc.FieldGetText("LastName")<**>     fullName = firstName & " " & la
stName<**>     Call doc.FieldSetText(fullName, "FullName")<**>End Sub

@Dhead@<:#200,8486>Example 3

<:#400,8486>The following event script executes when the user exits from the Age field. The script forces the user to enter an age.

@Mono@<:#2200,8486>Sub Exiting(Source As Field)<**>     Dim workspace As New NotesUIWorkspace<**>     Set doc = workspace.CurrentDocument<**>     age = doc.FieldGetText("Age")<**>     If age = "" Then<**>          While age = ""<**>               age = Inputbox$("Whoa! You mu
st enter your age.")<**>          Wend<**>          Call doc.FieldSetText(age, "Age")<**>     End If<**>End Sub

@Dhead@<:#200,8486>Example 4

<:#400,8486>The following event script executes when the user exits from the Sales field. The script sends a mail message to Mary Chen.

@Mono@<:#1600,8486>Sub EXITING(SOURCE As FIELD)<**>   Dim s As New NotesSession()<**>   Dim db As New NotesDatabase("", "")<**>   Dim doc As New NotesDocument(db)<**>   call doc.AppendItemValue("Subject", "Sales Updated")<**>   call doc.AppendItemValue("Body", "Sales field up
dated by " & s.UserName)<**>   call doc.SendTo("Mary Chen", True)<**>End Sub

@Ahead@<:s><:#240,8486>Writing field design formulas

<:#200,8486><:X8,-32768;Index "Field formulas" #>As part of the field design process, you can specify:

@Bullet@<+)>Writing a d<-)><+)>efault value formula<-)><+)>s<-)><+*>H_WRITING_A_DEFAULT_VALUE_FORMULA<-*>

@1st lev para@<:#400,8486>A default value formula<:X8,-32768;Index "Default value formula" #> provides an initial value for a field. You must specify a default value formula for an uneditable rich text field.

@Bullet@<:#200,8486><+)>Writing an i<-)><+)>nput translation<-)><+)> formula<-)><+*>H_WRITING_AN_INPUT_TRANSLATION_FORMULA<-*>

@1st lev para@<:#400,8486>An input translation formula<:X8,-32768;Index "Input translation formula" #> converts the data entered in the field to adjust the field value or make the field conform to a format.

@Bullet@<:#200,8486><+)>Writing an i<-)><+)>nput validation<-)><+)> formula<-)><+*>H_WRITING_AN_INPUT_VALIDATION_FORMULA<-*>

@1st lev para@<:#200,8486>An <:X8,-32768;Index "Input validation formula" #>input validation formula checks the data entered in the field against criteria that you specify.

@Bullet@<:#400,8486><+)>Writing a value<-)><+)> formula for a computed field<-)><+*>H_WRITING_A_VALUE_FORMULA_FOR_A_COMPUTED_FIELD<-*>

@1st lev para@<:#400,8486><:X8,-32768;Index "Computed field formula" #>If the field type is Computed, Computed for display, or Computed when composed, you must write a formula to specify the field contents.

@Bullet@<:#200,8486><+)>Writng a k<-)><+)>eyword<-)><+)> field<-)><+)> formula<-)><+*>H_WRITING_A_KEYWORD_FIELD_FORMULA<-*>

@1st lev para@<:#400,8486>A keyword<*(> field presents the user with a list of keywords for entry into the field. You can write a formula or specify a list of text values.

@See also prnt@<:#400,8486>For Information on the user interface, see "Field formulas" in Help or in Chapter 
<+"><+!>N<-!><-"> of the <+">Application Developer's Guide<-">.

@See also prnt@<:#200,8486>These formulas run on the user's workstation.

@See also btn@<:#200,8486>

@Crossref@<:#200,8486><+)>Field<-)><+)> f<-)><+)>ormulas<-)><+*>H_FIELD_FORMULAS<-*>

@Bhead title@<:#220,8486><++>W<-+><+,>riting a default Value Formula<-,>

<:#800,8486>A default value formula<:X8,-32768;Index "Default value formula" #> provides an initial value for a field. This formula executes when a document is created, and for uneditable rich text fields when the document is saved. The user can change the value in the
 field except for uneditable rich text fields. You must specify a default value formula for an uneditable rich text field.

<:s><:#200,8486>A default value formula must evaluate to a value suitable for storage in the current field.

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_WRITING_A_DEFAULT_VALUE_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a default value formula

@Dhead@<:s><:#200,8486>Example 1

<:#800,8486>If you want the initial value for a field to be the user surname in uppercase letters, you can write the following default value formula. The @Left function returns the part of the name to the left of the first slash, if there is a slash, which extracts the
 name proper from the distinguished name. The @RightBack function returns the part of the name to the right of the last space.

@Mono@<:#200,8486>@UpperCase(@RightBack(@Left(@UserName; "/"); " "))

@Bhead title@<:#220,8486><++>W<-+><+,>riting an input Translation Formula<-,>

<:#400,8486>An input translation formula<:X8,-32768;Index "Input translation formula" #> converts the data entered in the field to adjust the field value or make the field conform to a format. This formula executes when the document containing the field is saved.

<:s><:#200,8486>An input translation formula must evaluate to a value suitable for storage in the current field.

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_AN_INPUT_TRANSLATION_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing an input translation formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want the Subject field in proper case (initial capitals) with no extraneous spaces, you can write the following input translation formula.

@Mono@<:#200,8486>@Trim(@ProperCase(Subject))

@Bhead title@<:#220,8486><++>W<-+><+,>riting an input Validation Formula<-,>

<:#400,8486>An <:X8,-32768;Index "Input validation formula" #>input validation formula checks the data entered in the field against criteria that you specify. This formula executes after the input translation formula.

<:#200,8486>An input validation formula should end with a call to @Success or @Failure.

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_AN_INPUT_VALIDATION_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing an input validation formula

@Dhead@<:s><:#200,8486>Example 1

<:#200,8486>If you don't want the Cost field to exceed 100, you can write the following input validation formula.

@Mono@<:#200,8486>@If(Cost<<100; @Success; @Failure("Cost must be less than $100)

@Dhead@<:s><:#200,8486>Example 2

<:#1000,8486>The following formula forces the user to enter a ten-digit number. The formula removes up to two hyphens if they are present. The formula converts the result to a number and returns a failure if an error occurs on the conversion. The formula converts the nu
mber back to text and checks its length, returning a failure if the length is incorrect. This last step is necessary because @TextToNumber successfully converts, for example, 123A to 123.

@Mono@<:#1400,8486>N1 := @If(@Contains(Home_Phone; "-"); @Left(Home_Phone; "-") + @Right(Home_Phone; "-"); Home_Phone);<**>N2 := @If(@Contains(N1; "-"); @Left(N1; "-") + @Right(N1; "-"); N1);<**>N := @TextToNumber(N2);<**>@If(@IsError(N); @Failure("Home phone must be zip-xxx-
xxxx."); @Success);<**>@If(@Length(@Text(N)) != 10; @Failure("Home phone must be zip-xxx-xxxx."); @Success)

@Bhead title@<:#220,8486>Writing a value<+,> Formula<-,> for a computed field

<:#800,8486><:X8,-32768;Index "Computed field formula" #>If the field type is Computed, Computed for display, or Computed when composed, you must write a formula to specify the field contents. This formula executes: for Computed, when the document is created and when i
t is saved; for Computed for display, whenever the document is opened; for Computed when composed, only when the document is created. Its value cannot be changed.

<:s><:#200,8486>A computed field formula must evaluate to a value suitable for storage in the current field.

@See also hlp@<:#110,8486><+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_COMPUTED_FIELD_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a computed field formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>If you want the Date field to contain the time and date that the document is created, you can write the following computed field formula.

@Mono@<:#200,8486>@Created

@Bhead title@<:#220,8486><++>W<-+><+,>riting a keyword<-,><+,> Field Formula<-,>

<:#400,8486><:X8,-32768;Index "Keyword field formula" #>A keyword<*(> field presents the user with a list of keywords for entry into the field. The list can be the result of a formula or a list of constants.

<:s><:#200,8486>A keyword field formula must evaluate to a value or list of values suitable for storage in the current field.

@See also hlp@<+)>

@See also btn@<:#200,8486><+)>{bmc 1details.bmp}<-)><+)>See examples<-)><+*>H_EXAMPLES_WRITING_A_KEYWORD_FIELD_FORMULA<-*>

@Chead title@<:#200,8486>Examples: writing a keyword field formula

@Dhead@<:s><:#200,8486>Example 1

<:#400,8486>The following formula uses as a keyword list the values in column 1 of the Names view in the current database.

@Mono@<:s><:#200,8486>@DbColumn(""; ""; "Names"; 1)

@Dhead@<:s><:#200,8486>Example 2

<:#600,8486>The following formula reformats the user name as last name, comma, first name, taking care to handle distinguished names. The formula looks up the reformatted user name in the Phone Numbers view of the current database and returns a list consisting of the v
alues found in columns 2 and 3.

@Mono@<:#800,8486>N := @Left(@UserName; "/");<**>K := @Right(N; " ") + ", " + @Left(N; " ");<**>@DbLookup(""; ""; "Phone Numbers"; K; 2) : @DbLookup(""; ""; "Phone Numbers"; K; 3)

@Ahead@<:#240,8486>Understanding the sequence of script events

<:#400,8486>A script executes in response to the occurrence of an event in an object. The following table lists the events and the objects to which they apply. Column 1 lists the relative sequence of script events.

<:t1> 

>

[Embedded]
00091536
