Show TOC

Function documentationMODIFYSCRIPT Package Variable Tasks (Memory Management) Locate this document in the navigation structure

 

The following table details the MODIFYSCRIPT Package Variable tasks that can be used to control the size and format of generated queries.

Task Syntax

Description

TASK(TASKNAME,SCOPEBY,)

This instruction allows you to expand logic execution scope when data is entered through Interface for Office or through an import file.

Consider a case in which only modified products would be included in the execution without an expansion of the scope. In the following example, the SCOPEBY parameters are used to include additional dimensions in the logic execution.

Example Example

*SCOPE_BY = CATEGORY, TIME, ENTITY

TASK(TASKNAME,QUERYSCOPE,0)

*QUERY_SIZE = 0 | 1 | 2

End of the example.

The *QUERY_SIZE parameter can take the following values:

  • 0: smallest practical size

  • 1: an intermediate size

  • 2: the largest practical size

TASK(TASKNAME,MAXMEMBERS,Entity)

This instruction allows you to define the maximum number of members to process in a query. If the number is exceeded, the query is divided into multiple queries. Use the following syntax:

{dimension} = {number of members}[,{dimension} = {number of members}]

If these fields are left empty, the default value is ENTITY=1.

TASK(TASKNAME,RUNTHELOGIC,value)

This instruction allows you to determine whether or not the task is executed. This instruction can be included in the PROMPT command. This is allows the user to decide whether or not to execute the logic at runtime, after importing data.

The value parameter can take the following values:

  • 0: Do not run this task

  • 1: Run this task (this is the default)

Example Example

PROMPT(CHECKBOX,%RUN%,"Run the default logic after import")

TASK(K2RUNLOGIC,RUNTHELOGIC,%RUN%)

TASK(TASKNAME,CALCULATEDIFFERENCE,1)

End of the example.

Note Note

A user might select this option to minimize the time needed to post calculated values in the database. When a calculated value is sent to the system, it takes time to both calculate and record the difference between what is already stored and the new value. In cases where this calculation is performed by the logic module, it can be more efficient to omit the calculation at the time the data is posted.

End of the note.