22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

if (employees.recordCount gt 10)<br />

{<br />

returnVal.shortMessage = "First 10 of #employees.recordCount#<br />

records";<br />

}else{<br />

returnVal.shortMessage = "Records found:<br />

#employees.recordCount#";<br />

}<br />

// The session.users structure contains the found names.<br />

// The record key is a number that is also returned in front of the<br />

// name in the message.<br />

session.users = structNew();<br />

for(i=1; i lte min(10, employees.recordCount); i=i+1)<br />

{<br />

// These two lines are formatted to prevent extra white space.<br />

returnVal.shortMessage = returnVal.shortMessage & "<br />

#i# - #employees.firstName[i]# #employees.lastName[i]#";<br />

// The following two lines must be a single line in the source<br />

session.users[i]="#employees.firstName[i]#<br />

#employees.lastName[i]#";<br />

}<br />

}<br />

return returnVal;<br />

<br />

<br />

<br />

1578 Using the SMS Event Gateway

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!