Accessing Scenario Attachments
Apps can define attachment tags which are assigned to individual attachments and used when querying the attachments from the view.
![]() |
Note
Xpress Insight also supports app-scoped attachments (in contrast to
scenario-scoped attachments) and while these are not accessible via VDL expressions, they can be accessed via JavaScript.
|
<ul> <li vdl-repeat="=attachment in scenario.attachments()"> <div vdl-text="=attachment.filename"></div> <div vdl-text="=attachment.description"></div> </li> </ul>
<ul> <li vdl-repeat="=tag in scenario.attachments.tags()"> <div vdl-text="=tag.name"></div> <div vdl-text="=tag.description"></div> </li> </ul>
<ul> <li vdl-repeat="=tagName in scenario.attachments.tagNames()"> <div vdl-text="=tagName"></div> </li> </ul>
<ul> <li vdl-repeat="=attachment in scenario.attachments.byTagName('input-sheet')"> <div vdl-text="=attachment.filename"></div> <div vdl-text="=attachment.description"></div> </li> </ul>If no attachments match a tag name then an empty list is returned, which can be subsequently used in a conditional expression:
<div vdl-if="=scenario.attachments.byTagName('unknown-tag').length === 0"> No attachments found with the tag "unknown-tag". </div>Conditionals and the <vdl-if> element are described fully in Working with Conditional VDL Attributes.
<ul vdl-if="=scenario.attachments('input.xslx').id"> <li vdl-text="='filename: ' + scenario.attachments('input.xslx').filename"></li> <li vdl-text="='description: ' + scenario.attachments('input.xslx').description"></li> <li vdl-text="='size: ' + scenario.attachments('input.xslx').size"></li> </ul>When no attachment matches the file name, an empty object is returned. In the above <ul> element, the vdl-if attribute checks that a matching attachment exists by testing for the id property.
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.