You are here: System Setup > Attributes > Calculated Attributes > Commercial Value Functions

Commercial Value Functions

Calculated Attribute expressions can be written using the following available functions. Examples follow the Available Functions table.

Available Functions

Note: The [effective date] parameter uses ISO date time format (YYYY-MM-DD 24:MI:SS). If not supplied, the current date / time are assumed.

Function

Parameters

Description

TERMVAL

('termslisttype-id', 'break-no'[, effectivedate])

Returns the term value of the supplied 'termslist type id, ' for the current publication versionin the supplied 'break no' for the given effective date.

[effective date] is optional.

TERMUNIT

('termslisttype-id', 'break-no'[, effectivedate])

Returns the name of the unit of the term of the supplied 'termslist type id' for the current publication version in the supplied break-no for the given effective date.

[effective date] is optional.

TERMUNITID

('termslisttype-id', 'break-no'[, effectivedate])

Returns the ID of the unit of the term of the supplied 'termslist type id' for the current publication version in the supplied break-no for the given effective date.

[effective date] is optional.

TERMQTYMAX

('termslisttype-id', 'break-no'[, effectivedate])

Return the maximum quantity of the supplied 'termslist type id' for the current publication version in the supplied break-no for the given effective date.

[effective date] is optional.

TERMQTYMIN

('termslisttype-id', 'break-no'[, effectivedate])

Return the minimum quantity of the supplied 'termslist type id' for the current publication version in the supplied break-no for the given effective date.

[effective date] is optional.

TERMVALID

('termslist-id', 'break-no'[, effectivedate])

Return the term value of the supplied 'termslist id' for the current publication version in the supplied break-no for the given effective date.

[effective date] is optional.

Examples

Terms List Object Type ID = PriceID

Terms List ID = TermsListID

Product Name

Value

Unit - name(id)

Min Qty

Max Qty

Start

End

P&G Party Hat 1

$7.79

$ (iso4217.unit.USD)

1

11

Jan-1-15

Dec-31-15

P&G Party Hat 2

$2.79

$ (iso4217.unit.USD)

12

24

Jan-1-15

Dec-31-16

B&Y Party Hat 1

£6.79

£ (iso4217.unit.GBP)

1

11

Jan-1-15

Dec-31-17

B&Y Party Hat 2

£3.79

£ (iso4217.unit.GBP)

12

24

Jan-1-15

Dec-31-18

Copy and paste any of the following examples into the Function Editor and then evaluate against the specified object to get the defined result.

termval('PriceID', '1', '2015-12-31 01:01:01') // returns $7.79 for P&G Party Hat 1
termval('PriceID', '2', '2015-12-31 01:01:01') // returns $2.79 for P&G Party Hat 2
termunit('PriceID', '1') //returns $ for P&G Party Hat 1; returns £ for B&Y Party Hat 1
termunitid('PriceID', '1') //returns 'iso4217.unit.USD' for P&G Party Hat 2; returns 'iso4217.unit.GBP' for B&Y Party Hat 2
termqtymax('PriceID', '1') // returns 12 for B&Y Party Hat 2
termqtymin('PriceID', '1') // returns 24 for B&Y Party Hat 2
termvalid('TermsListID', '1') // returns 24 for B&Y Party Hat 2

2017, Stibo Systems