2022.2

Table Of Contents
results.attr("content","Media 1");
Media1willhavebeenreplacedwiththenameofthemediaselectedforthechosensheetpos-
ition.
ThefieldSelectorintheScriptWizardcontainsthenameofthesectionandthesheetposition
thatyouhavechosen.
4. Changethescriptsothatonacertaincondition,anothermediawillbeselectedforthecontent.
Forinstance:
if(record.fields.GENDER === 'M') {
results.attr("content","Media 2");
}
ThisscriptchangesthemediatoMedia2formalecustomers.
See"Writingyourownscripts"onpage808ifyouarenotfamiliarwithhowscriptsarewritten.
5. ClickApply,openthetabPreviewandbrowsethroughtherecordstoseeifthescriptfunctions
asexpected.
6. WhenyouclickOK,thescriptwillbeaddedtotheScriptspane.
Rotating the Media in a Print section
TheactualorientationoftheMediaandthatofasectiontowhichtheMediaisappliedmaynotmatch.
TheMedia(tobemoreaccurate:theVirtualStationeryimagesspecifiedforthisMedia)cantherefore
berotatedperPrintsection:
l
OntheResourcespane,expandthePrintcontext;right-clickthePrintsection,andclickSheet
configuration.
l
ClickoneoftheoptionsnexttoMedia rotation.
TheMediawillberotatedaccordinglyintheentiresection.
l
AnyVirtualStationerysettingsmadefortheMediaalsoinfluencehowtheMediaisdis-
playedineachsection(see"SettingMediaproperties"onpage466).
l
Sectionbackgroundsarerotatedseparately(see"UsingaPDFfileorotherimageasback-
ground"onpage451).
IfintheMediaproperties,theVirtualStationerypositionissettoAbsolute,anyoffsetgivenbytheTop
andLeftvalueswillbeappliedafterrotation.AVirtualStationeryimagelocatedabsolutelyatthetop
left(Top:0,Left:0)willstillappearatthetopleftofthepageafterrotatingtheMedia.
Page 470