Accessing Scenario Attachments
Apps can define attachment tags which are assigned to individual attachments and used when querying the attachments from the view.
vdl-repeat attribute, which is accessible as the 
 Repeat Attribute in the 
 View Designer. For more, see 
 Using Loops with Arrays and Sets. 
To loop over all scenario attachments, repeating a row holding text elements:
<vdl-section heading="Accessing Scenario Attachments">
    <vdl-row vdl-repeat="=attachment in scenario.attachments()">
        <vdl-column>
            <span vdl-text="=attachment.filename"></span>
            <span vdl-text="=attachment.description"></span>
        </vdl-column>
    </vdl-row>
</vdl-section> 
 
  To loop over all scenario attachment tags, repeating a row containing text elements:
<vdl-section>
    <vdl-row vdl-repeat="=tag in scenario.attachments.tags()">
        <vdl-column>
            <span vdl-text="=tag.name"></span>
            <span vdl-text="=tag.description"></span>
        </vdl-column>    
    </vdl-row>
</vdl-section>
 
 
  To loop over scenario attachment tag names:
<vdl-section heading="List of Items">
    <vdl-row>
        <vdl-column>
            <ul>
                <li vdl-repeat="=tagName in scenario.attachments.tagNames()">
                    <div vdl-text="=tagName"></div>
                </li>
            </ul>
        </vdl-column>
    </vdl-row>
</vdl-section>To loop over scenarios that have particular tag assigned to them:
<vdl-section heading="List of Items">
    <vdl-row>
        <vdl-column>
            <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>
        </vdl-column>
    </vdl-row>
</vdl-section><div vdl-if="=scenario.attachments.byTagName('unknown-tag').length === 0">
No attachments found with the tag "unknown-tag".
</div>
<vdl-if> element, see 
 Working with Conditional VDL Attributes. 
To access individual attachments by file name:
<vdl-row>
    <vdl-column>
        <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>
    </vdl-column>
</vdl-row>
<ul> element, the 
 vdl-if attribute checks that a matching attachment exists by testing for the 
 id property. 
© 2001-2025 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.
 
