Initializing help system before first use

ins~getset

Purpose
Create an ins~entityfetch record for fetching the content of a set entity into a Mosel variable.
Synopsis
function getset(entity:text, dst:any):ins~entityfetch
Arguments
entity 
The name of the entity to fetch
dst 
A reference to a set into which to store the entity content
Return value
A value that can be passed to ins~getscendata to read the entity into the given set.
Example
declarations
  SCENARIO_ID='2926e9a1-9568-4116-84ed-2e75190bc651'
  months: set of integer
  users: set of string
end-declarations
ins~getscendata(SCENARIO_ID, [ ins~getset('months', months),
   ins~getset('users', users) ] )
if ins~haserror then
  writeln_('Error: ',ins~getlasterror)
else
  writeln('Months: ', months)
  writeln('Users: ', users)
end-if
Example of fetching set entities into Mosel variables.
Further information
1. The destination must be a set of string, text, constant text, integer, real, boolean, or any.
2. If the entity type does not match the type of the set, the value will be converted (e.g. a integer type entity would be be converted to a string to be stored in a set of string).
3. Any content previously in the set will be removed during the call to ins~getscendata. If the set is indexing an array, this may result in a runtime error within the model.
4. This function cannot fail; invalid parameter values will only cause an error when the returned value is passed to ins~getscendata.
Related topics

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