Search	Terms	and	Design	Complexity:	
A	Tutorial	Before	Modernizing	or	Migra>ng	
December	13,	2017	
©	2017	Teamstudio,	Inc.
Courtney	Carter	
Marke>ng	Manager	
@Teamstudio	
Brian	Arnold	
Technical	Director	
@NotesBoy38	
©	2017	Teamstudio,	Inc.
Agenda	
§  Introduc>on	
§  Slides	and	Demo	from	Brian	
§  Q&A	
©	2017	Teamstudio,	Inc.
Teamstudio	Adviser	 Teamstudio	Configurator
Example	Search	Terms	
•  @MailSend	
•  @DbColumn	
•  @DbLookup	
•  @Environment	
•  @SetEnvironment	
•  ODBCQuery	
•  ODBCConnecDon	
•  .dll	
•  Excel.	
•  Word.
Get	Temporary	Variable	
JavaScript	
<script type=‘text/javascript’ language=‘javascript’>
function getEnvironmentString() {
var childNumbers = localStorage.getItem(“childNumbers”);
alert(childNumbers);
}
</script>	
LotusScript	
Dim	session	As	New	NotesSession	
MessageBox	session.Getenvironmentstring("childNumbers")	
@Formula	
@Prompt([OK];””;@Environment(“childNumbers”))
Send	an	Email	
C#	(common	programming	language	for	ASP.NET)	
SPWebApplicaDon	webApp	=	SPWebApplicaDon.Lookup(new	Uri("hbp://ServerName:7777/"));	
var	mail	=	new	MailMessage();	
mail.From	=	new	MailAddress("Test@Test.com");	
mail.To.Add("Test@Test.com");	
mail.Subject	=	"Subject	of	the	email";	
mail.Body	=	"Body	of	the	email";	
SmtpClient	smtp	=	new	SmtpClient	(webApp.OutboundMailServiceInstance.Server.Address);	
smtp.UseDefaultCredenDals	=	true;	
smtp.Send(mail);	
LotusScript	
Dim	session	As	New	NotesSession 		
Dim	db	As	NotesDatabase 		
Dim	doc	As	NotesDocument	
Set	db=session.Currentdatabase 		
Set	doc=New	NotesDocument(db)	
Call	doc.Replaceitemvalue("SentTo",	"Test@Test.com")	
Call	doc.Replaceitemvalue("Subject","Subject	of	email”)	
Call	doc.Replaceitemvalue("Body","Body	of	email”)	
Call	doc.Send(False)	
@Formula	
@MailSend(“Test@Test.com”;””;””;”Subject	of	email”;””;”Body	of	email”)
Get	Keyword	List	from	View	Column	
JavaScript	
Var lookupList = dbColumn(‘http://11.22.33.44’,’folder/db.nsf’,’Keywords’,1)	
	
//	but	you	need	the	func.on	“dbColumn”	first!	
<script type=‘text/javascript’ language=‘javascript’>
function dbColumn(server, path, view, column) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
var pos = 0;
currURL = (document.location.href).toLowerCase();
if (trim(server) == "") {
pos = currURL.indexOf(' ://' );
if (pos < 0)
server = "http://11.22.33.44" //
PUT YOUR SERVERNAME HERE
else {
pos += 3;
pos = currURL.indexOf(' /' , pos);
	
LotusScript	
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entry As NotesViewEntry
Dim x As Integer
Dim lookupList() As String
Set db=session.Getdatabase("11.22.33.44","folderdb.nsf")
Set view=db.Getview("Keywords")
Set nav=view.Createviewnav()
Set entry=nav.Getfirst()
While Not entry Is Nothing
ReDim Preserve lookupList(x)
lookupList(x)=entry.Columnvalues(0)
x=x+1
Set entry=nav.Getnext(entry)
Wend
@Formula	
lookupList	:=	@DBColumn(“NoCache”;”11.22.33.44”:”folderdb.nsf”;”Keywords”;1);
JavaScript	ConDnued	server = currURL.substring(0, pos)
}
}
if (trim(path) == "") {
if (pos > 0) {
newPos = currURL.indexOf(' .nsf' , pos);
if (newPos > 0) {
path = currURL.substring(pos + 1, newPos + 4)
}
}
}
if (!isNaN(column))
column -= 1;
vurl = trim(server) + "/" + trim(path) + "/" + view +
"?readviewentries&login=1&count=9999";
xmlDoc.load(vurl);
nodes = xmlDoc.documentElement.childNodes;
temp = new Array(nodes.length);
var j = 0;
for (var i = 0; i < nodes.length; i++) {
temp[j] = nodes.item(i).childNodes.item(column).text;
j++;
}
JavaScript	ConDnued		
				results	=	new	Array(j);	
				for	(var	i	=	0;	i	<	j;	i++)	{	
								results[i]	=	temp[i];	
				}	
	
				return	(results);	
}	//End	of	dbColumn		
	
funcDon	trim(sStr)	{	
				var	iI	=	0;	
				var	iJ	=	0;	
				var	iTam	=	0;	
				var	sAux	=	"";	
	
				iTam	=	sStr.length;	
				if	(iTam	==	0)	return	(sStr);	
	
				for	(iI	=	0;	iI	<	iTam;	iI++)	
								if	(sStr.charAt(iI)	!=	'	')	break;	
	
				if	(iI	>=	iTam)	return	("");	
	
				for	(iJ	=	iTam	-	1;	iJ	>=	0;	iJ--)	
								if	(sStr.charAt(iJ)	!=	'	')	break;	
	
				return	(sStr.substring(iI,	iJ	+	1));	
}	//End	of	trim	
</script>
Q&A	
©	2017	Teamstudio,	Inc.
©	2017	Teamstudio,	Inc.	All	rights	reserved.	Teamstudio®	and	CIAO!®	are	registered	trademarks	of	Teamstudio,	Inc.,	in	the	United	States,	other	countries,	or	
both.	IBM,	Lotus,	Lotus	Notes,	and	Domino	are	trademarks	of	InternaJonal	Business	Machines	CorporaJon	in	the	United	States,	other	countries,	or	both.	All	other	
trademarks	and	registered	trademarks	are	the	property	of	their	respecJve	owners.

Search Terms and Design Complexity: A Tutorial Before Modernizing or Migrating