With an attachment built-in to the app archive, it is always accessible at runtime (subject to the appropriate permissions).
- Republish your app, then reload and run Scenario 1.
The value loaded into
cautionText from the
caution.txt attachment is displayed:
Loading an Attachment via the App Archive
This demonstrates that the text ** Text to be replaced ** comes from the model as was configured earlier.
- Click the Actions icon
in the top right of the browser, and select App Attachments from the drop-down menu.
Actions Menu
The Attachments Dialog appears, in which a single attachment is listed - caution.txt.
- Click the Edit with Text Editor icon
and replace the existing text with:
cautionText:"WARNING: Share prices can go down as well as up."
- Click Save, Close and Close again.
- Reload Scenario 1.
The caution text has been changed.
Result of Changing an Attachment at Runtime
A runtime change to the attachment has made its way back into the model, where it was marshaled into the cautionText entity and displayed once again. Note, however, that this required a reload of the app data because the code which reads the attachment was added to the datainput procedure. More generally, attachments can be accessed from anywhere in your code and their accessibility is not dependent on reloading data.
© 2001-2020 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.