Functions
Key Functions in Task refers to the set of N Deriscope Functionsƒ¹, ƒ², ..., ƒᴺ that must be executed consecutively when this task runs its course through invocation of the function Run
Expects an object of type Set consisting of up to 8 columns and N rows below the top row containing the titles
The iᵗʰ row defines the respective function ƒⁱ and consists of up to 8 cells that prescribe how exactly the function ƒⁱ should run.
The order by which the functions are executed is from top to bottom, i.e. the function ƒ¹ comes first, followed by ƒ² and so on.
Below is the list of valid column titles
Column with title #Function
Mandatory
This column defines the name of each Deriscope Functionƒⁱ as a text that can be recognized by Deriscope as a valid entry to the Global KeyFunction=
Examples of valid function names are: Create, Price, Yield etc.
Column with title #Type
Optional
This column is relevant for a particular row i only if that row's function ƒⁱ is intended to be used as a static function
It then supplies the name of the applicable Deriscope Type as a text that can be recognized by Deriscope as a valid entry to the Global KeyType=
If the column is omitted or the entry is blank, the function is treated as a local function that derives its context from the Deriscope Object on which it applies.
The latter object is determined by the corresponding entry in the column titled #Target
Column with title #Target
Optional
This column is relevant for a particular row i only if that row's function ƒⁱ is intended to be used as a local function
It must then define a collection of objects that will serve as targets to the function, in the sense that the function will be repeatedly apply on each of the objects in that collection.
This collection can be defined directly through the handle name of an object of type Portfolio or Collection
But it may be also defined indirectly through some integer i, which points to the row hosting a particular function ƒⁱ, of which the prior execution has resulted in the creation of an object of one of the two types above.
The value i = 1 points to the topmost row that holds the function ƒ¹ designed to be executed at first.
The i must be between 1 and K-1, where K is the index of the row of the hosting cell.
If the integer i is used as entry here, the pointed iᵗʰ row must have the boolean TRUE set in its cell in the column under the title #GroupResult
Column with title #CommonInput
Optional
This column provides a set of Key-Value pairs(K₁,V₁), (K₂,V₂), ... that constitute the subset of the input parameters passed to the function ƒⁱ that stay the same as ƒⁱ is consecutively executed.
More specifically, the function ƒⁱ will be invoked R times, where R is the number of elements in each array contained in the Values of the Key-Value pairs at the column titled #VaryingInput
At each such invocation, the function ƒⁱ will be fed with an input consisting of the union of the fixed pairs (K₁,V₁), (K₂,V₂), ... defined here and the Key-Value pairs defined at the column titled #VaryingInput
An object of type KeySet is expected here.
If the column is omitted or the entry is blank, the ƒⁱ is consecutively executed without any fixed input parameters, i.e. with either no input parameters or input parameters that all change during each execution.
Column with title #VaryingInput
Optional
This column provides a set of Key-Value pairs(K₁,V₁), (K₂,V₂), ... that constitute the subset of the input parameters passed to the function ƒⁱ that keep changing as ƒⁱ is consecutively executed.
More specifically, the function ƒⁱ will be invoked R times, where R is the number of elements in each array contained in the Values of the Key-Value pairs defined here.
At each such invocation, the function ƒⁱ will be fed with an input consisting of the union of the fixed Key-Value pairs defined at the column titled #CommonInput and the pairs (K₁,V₁), (K₂,V₂), ... defined here.
An object of type KeySet is expected here.
If the column is omitted or the entry is blank, the ƒⁱ is consecutively executed without any varying input parameters, i.e. with input parameters that stay the same during each execution.
Column with title #OutputSubset
Optional
This column is relevant for a particular row i only if a) that row's function ƒⁱ returns a composite value and b) only a subset of that value should be considered as that function's final output in this task's processing.
If the column is omitted or the entry is blank, function's output in this task is set equal to the full contents of the function's original return value.
Column with title #GroupResult
Optional
This column is relevant for a particular row i only if the output of that row's function ƒⁱ (perhaps modulated by the respective entry under the title #OutputSubset) is either an object or a number.
If set to TRUE, the R objects or numbers produced by the R runs of the function ƒⁱ are grouped together into some collective object, which is then reported.
More precisely:
If each function ƒⁱ returns an object, the collection of these objects is constructed as an object of type Portfolio or Collection, as appropriate.
If each function ƒⁱ returns a number, the sum of these numbers is reported.
If the column is omitted or the entry is blank, the value here is assumed to be FALSE
Column with title #Report
Optional
This column controls whether the output of that row's function ƒⁱ should be part of the report produced by the function Task or not.
TRUE means the function's output should be reported.
If the column is omitted or the entry is blank, the value here is assumed to be TRUE
