5.8 Dialog Formula Editor

The formula editor can be opened in various dialogs, like the dialog Edit license , tab General  and tab Windows , Buttonsund.

Areas of the formula editor

Name

In the field Name, you can see the name of the formula or New formula. Please replace New formula with a name of your choice.

Description

Here you can enter some additional information on the formula.

Formula (Return value has to be in the variable r)

Here the formula is entered.

Formula components

This field contains a selection of several function components which serve you to enter your formula as required. These formula components can be extended by CreateCtrl. A selected component is assumed into the Formula field by a double click.

Field below Formula components

As soon as a function component is chosen, a help text is displayed here.

Formula result or error

By clicking on this button you can check the current formula regarding syntax criteria. The formula syntax is ok if no result or date is displayed here. The content of a formula CANNOT be checked with this test. To check the contents according to correctness please prepare some examples and enter a date in the distribution channel/s or value attribute/s and or in the workflow step/s and/or function/s. and compare the result in the field with the expected result.

>Buttons<

Search formula: Before entering a new formula please check whether this formula already exists by searching for it.

New formula: Here, you can add a new formula.

No formula: With this button you can select no formula.

Save formula: Saves the current formula.

Delete formula: Deletes the current formula for the current license. To delete a formula completely from the data pool, please open the individual licenses and delete it there. For example, was the formula used in 3 licenses, it is only deleted completely after deleting the formula for all 3 licenses.

OK: Serves to save the formula.

Cancel: The formula is not saved and the dialog closes.

Notice:

General information on the formula syntax:

  • "then" or "else" or "r:=" or "end if" must be followed by a semicolon";"
  • Only enter a semicolon after "if", if it is ended by "then"
  • For any "if" you have to enter a "end if"
  • Comments start with /* and are ended with */
  • Formulas for calculating the license end date need the function component "SubtrahiereD". This specific component used the time offset of minus one day.

Functions of the formula editor

Add date

Adds a time range to the specified date.

Parameters 1, 2 and 3 form an addition on the result. Enter here 0 if addition is not desired.

Result: The calculated date from the value attribute plus the specified addition, if applicable.

Contract begin

Returns the date of the contract begin.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Contract date

Returns the date of the contract date.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Contract end

Returns the date of the contract end.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Date

Returns a fixed date.

Parameter 1 represents the sought date.

Result: The date which is specified via the parameter.

Distribution channel (Program - BoxOffice)

Returns the date for the distribution channel in the given country of licensing program.

Parameter 1 represents the names of the process. Parameter 2 represents the names of the process step. Parameters 3, 4 and 5 form an addition on the result. Please enter 0, if no addition is required.

Result: The date of the sought distribution channel plus the specified addition, if applicable.

EarliestDate

Returns the earlier of the two passed data. If one of the two dates has not yet entered, the other one is returned!

Parameter 1 represents the first date to be compared. Parameter 2 represents the second date to be compared.

Result: The earlier date.

First broadcast of the licensing program

Returns the date for the programs first broadcast on the license. The date can also be outside the license term.

t.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: The date of the first broadcast plus the specified addition, if applicable.

First planning of the licensing program

Returns the date for the programs first planning on the license. The date can also be outside the license term.

t.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: The date of the first broadcast plus the specified addition, if applicable.

First window broadcast

Returns the date for the first broadcast that is linked via window. Earlier runs, which are not linked by a license window, are not considered.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: Date of the first run.

First window broadcast of previous license

Delivers the date of the first run of the predecessor license, which is linked by a license window. Earlier runs, which are not linked by a license window, are not considered.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: Date of the first run of the precedessor license.

Last broadcast of the license program before the license ends

Delivers the date of the last broadcast of the program before the resent license time frame.

Parameters 1, 2 and 3 form the addition to the result. If no addition is required, please enter 0.

Last broadcast of the licensing program

Delivers the date for the last broadcast.

Parameters 1, 2 and 3 form the addition to the result. If no addition is required, please enter 0.

Result: The date of the broadcast plus the specified addition, if applicable.

Last planning of the license program

Delivers the date for the last scheduling.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: The date of the last scheduling plus the specified addition, if applicable.

Last window broadcast

Delivers the date of the last run, which is linked by a license window. Later runs, which are not linked by a license window, are not considered.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: Date of the last run.

Last window broadcast of previous license

Delivers the date of the last run of the predecessor license, which is linked by a license window. Later runs, which are not linked by a license window, are not considered.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: Date of the last run of the precedessor license.

Latest date

Delivers the later date of two provided dates.

If one of the two dates has not occurred yet, the other date is rejected.

Parameter 1 represents the first, parameter 2 the second of the two dates to be compared.

Result: The later date.

License begin

Delivers the date of the license start.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Result: The date of the license start plus the specified addition, if applicable.

License begin of purchase license

Delivers the date for the start of the purchase license.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Result: The start date of the purchase license plus the specified addition, if applicable.

License begin of the previous license

Delivers the date for the start of the predecessor license.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Result: The start date of the predecessor license plus the specified addition, if applicable.

License end

Delivers the date of the license end.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

License end of purchase license

Delivers the date for the end of the purchase license.

Parameters 1, 2 and 3 form an addition to the result. Please enter 0, if no addition is required.

Result: The end date of the purchase license plus the specified addition, if applicable.

License end of previous license

Delivers the date of the predecessor license end.

Parameters 1, 2 and 3 form an addition to the result. If no addition is required, please enter 0.

Process step date

Delivers the date when a workflow step has been accomplished.

Parameter 1 represents the name of the workflow. Parameter 2 represents the name of the process step. Parameters 3, 4 and 5 form an addition to the result. If no addition is required, please enter 0.

Result: The calculated date from the workflow step plus the specified addition, if applicable.

Subtract the date

Subtracts a time period from the specified date.

Parameter 1 (days), 2 (months) and 3 (years) form a deduction from the result. If no deduction is required, please enter 0.

Result: The provided date minus the specified deduction, if applicable.

Value attribute (License)

Delivers the date for a value attribute of the license.

Parameter 1 represents the name of the value attribute. Parameters 2, 3 and 4 form an addition to the result. If no addition is required, please enter 0.

Result: The calculated date from the value attribute plus the specified addition, if applicable.

Value attribute (Program)

Delivers the date for a value attribute of the program.

Parameter 1 represents the name of the value attribute. Parameters 2, 3 and 4 form an addition to the result. If no addition is required, please enter 0.

Result: The calculated date from the value attribute plus the specified addition, if applicable.