2022.2

Table Of Contents
Selector Matched element Matched element after script execution
#test <h1id="test">Fields</h1> <h1id="test">Fields</h1>
<p>Peter</p>
<p>Parker</p>
<p>pparker@localhost.com</p>
Thisscriptiteratesoverrowsinadetailtableandaddsthecontentsofthe'country'fieldtoaparagraph.
for(var i in record.tables['countries']) {
results.after("<p>" + record.tables['countries'][i].fields['country'] + "</p>");
}
Selector Matched element Matched element after script execution
#countries <h1id="countries">Countries</h1> <h1id="countries">Countries</h1>
<p>TheNetherlands</p>
<p>Canada</p>
<p>Australia</p>
Thisscriptiteratesoverrowsinadetailtableandaddsthecontentsofthe'ItemID2'fieldtoanoption.
The<option>tagdefinesanoptioninaselectlistinanHTMLform.
for(var i in record.tables['detail']) {
var str = record.tables['detail'][i].fields["ItemID2"];
results.append("<option value='" + str + "'>" + str + "</option>");
}
formatter
Theformatterisaglobalobjectthatallowsyoutoformatvaluesinascript.
TheHelperWizardandtheTextScriptWizardalsoallowyoutoformatvariabledata;see"Usingthe
HelperWizard"onpage725,"UsingtheTextScriptWizard"onpage729and"Formattingvariable
data"onpage732.
Note: TheTextFormatterobjectisnowdeprecatedandwilleventuallyberemoved.
Page 1175