Attachment Tags
The model and custom views can then refer to these attachments by tag name, instead of by filename. You can add and remove tags on an attachment using the attachments dialog in the web client, and in this way they can indicate that an attachment should be used by the model for a particular purpose. Without tags, the user could only achieve this by naming their file with a special filename known by the model. Users are not able to define custom attachment tags.
<attachment-config>
element, which should be placed immediately before the
<client>
element. In addition to its name, a tag can have the following properties:
- description: A description of the tag's purpose, which will be displayed in the attachments dialog in the web client.
- mandatory: If true, an attachment must exist with this tag before the scenario can be executed. By default, it is false.
- usage: Can be single-file or multi-file. Determines whether only one attachment per scenario can have this tag, or whether several attachments can have the tag at the same time. By default, a tag is multi-file.
Attachments provided in the app ZIP file in the attachments folder can be automatically tagged when the app is created. This allows an app that depends on tagged attachments to be configured with default attachment data by the app developer, so that the user does not need to manually add tags to attachments before using it.
<attachment-config>
<attachment-tags>
<!-- A single-file, mandatory tag, which will initially be present on input.xlsx, provided in the app zip file. -->
<attachment-tag name="input-sheet"
usage="single-file"
mandatory="true">
<description> A data source required by the Mosel model before it can execute (load or run).
</description>
<attachments>
<attachment>input.xlsx</attachment>
</attachments>
</attachment-tag>
<!-- A multi-file, non-mandatory tag, added by the model to any result files that it generates. -->
<attachment-tag name="result-sheet">
<description> An Excel file that is generated by the model containing the results.
</description>
</attachment-tag>
</attachment-tags>
</attachment-config>
A Mosel model can list of all the attachments with a given tag using insightlistscenattachbytag
or insightlistappattachbytag
. It can then download them to Mosel's local working directory using insightgetscenattach
or insightgetappattach
.
Alternatively the model can call insightgetattachbytag
, which searches both the scenario and the app for an attachment or attachments with the given tag and then downloads them automatically. This makes it possible to provide a default attachment on the app, but allow the user to optionally override it on each scenario. There are two versions of this subroutine: one which retrieves a list of attachments (for multi-file tags), and one which retrieves just one attachment (for single-file tags).
A Mosel model can also add tags to an attachment that it has generated, using insightsetscenattachtags
, to mark that attachment for a particular purpose in the user interface. A custom view can then locate the attachment from VDL or the JS API using the tag name.
See the Xpress Insight Mosel Interface Reference Manual for more information about these subroutines.
© 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.