Initializing help system before first use

insightgetattachbytag

insightgetattachbytag


Purpose
Searches the scenario and the containing app for an attachment or attachments with the given tag, and retrieves them from the Insight server, placing them in the Mosel working directory where they can be read by the model. If any scenario attachments with the given tag are found, these are retrieved without searching the app. If no scenario attachments with the given tag are found, then the search continues at the app level.
Synopsis
procedure insightgetattachbytag(tag:text, attachments:list of insightattachment)
procedure insightgetattachbytag(tag:text, attachment:insightattachment)
procedure insightgetattachbytag(tag:text, filenames:list of text)
Arguments
tag 
The tag to search for
attachment 
An attachment object which will be populated with the details of the attachment that was retrieved
attachments 
A list which will be populated with the details of the attachments that were retrieved
filenames 
A list which will be populated with the filenames of the attachments that were retrieved
Example
declarations
  attachment: insightattachment
end-declarations
insightgetattachbytag('mytag1', attachment)
if insightattachstatus<>INSIGHT_ATTACH_OK then
  writeln("Error searching for attachments")
else
  initializations from attachment.filename
    MY_ARRAY
  end-initializations
end-if
Example of searching for and retrieving an attachment with the tag tag1
Further information
1. Check the attachment status code using insightattachstatus to determine whether the attachment(s) were successfully retrieved.
2. Attempting to access attachments when the model is not being run through Xpress Insight will cause the model to abort with an error.
Related topics

© 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.