Adding Attachment Buttons
- upload-scenario-attachments - open an upload scenario attachment dialog.
- upload-project-attachment - opens an upload app attachment dialog.
- download-scenario-attachment - downloads a scenario attachment.
- download-project-attachment - downloads an app attachment.
- manage-scenario-attachments - opens a manage scenario attachment dialog.
- manage-project-attachments - opens a manage app attachment dialog.
- edit-scenario-attachment-properties - opens the edit scenario attachment dialog.
- edit-project-attachment-properties - opens the edit app attachment dialog.
You must also specify a filename or tag. A message - displayed to the user when the dialog opens - can also be specified.
<vdl-attachment-button scenario="=s.id" action="edit-scenario-attachment-properties" tag="result-sheet" field="description"> Edit </vdl-attachment-button>Alternatively, the next example defines a button that downloads an attachment.
<vdl-attachment-button action="download-scenario-attachment" tag="result-sheet"> Download </vdl-attachment-button>
Creating New Attachments
- create-project-attachment
- create-scenario-attachment
These values create app and scenario attachments respectively.
- editor - allows you to specify an attachment editor and hence define what type of file attachment to create.
- filename - allows you to specify a file name. The attachment is created when the button is pressed, taking the user directly into the relevant editor.
- tag - a single tag can be applied to the file attachment using this attribute.
Launching an Editor
<vdl-attachment-button action="edit-scenario-attachment" editor="<EDITOR NAME"> filename="README.txt"where editor can be one of:
- CTAttachmentEditor - a decision tree editor.
- TextAttachmentEditor - a simple text attachment editor.
- DMNAttachmentEditor - a Decision Modeling Notation (DMN) attachment editor.
- DecisionTableAttachmentEditor - a decision table attachment editor.
Intercepting Editor Closing Events
<vdl-attachment-button action="edit-scenario-attachment" filename="bacon.csv" editor="TextAttachmentEditor" on-close="=alert('saved:' + result.status + '. Last modified date: ' + result.attachment.lastModifiedDate)"> Edit attachment </vdl-attachment-button>
© 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.