Previous Topic

Book Contents

Book Index

Next Topic

getPicture()

The function returns object of type Picture when parameter of the function refers to a real picture, or null if it does not.

  • Functionality

    Returns object of type Picture when parameter of the function refers to a real picture, or null if it does not.

  • Arguments

    Attribute name in apostrophes, see example below.

  • Return

    Object type or null.

Example: The function is used with the Catalog Picture attribute of Product Type. This attribute displays Product Type 'Picture' attribute (called 'Main Picture' on the GUI) if available, otherwise it displays the 'Picture' attribute of corresponding Product Class.

Help Image

This is achieved by the following calculation 'itemtype_pictureAny' for attribute 'Catalog Picture : text' (string attribute with 'image' semantics).

Help Image

The 'getPicture()' function in the calculation checks if the 'picture' attribute references an existing image and retrieves the reference if the test is positive, otherwise value of the 'Picture' attribute of Product Class object type (itemtypeclass) is used. Note that the parameters in the formula must be in apostrophes to distinguish attribute names.

See Also

Available Functions

cast

countService

countService2

currencyConversion

cmp

dayOfMonth

ge (greater or equals than), ge_

gt (greater than), gt_

le (less or equals than), le_

lt (less than), lt_

eq (equals), eq_ and cmp

ne_

evalCondition

evalExpression

pyeval

not

isNull

Null

getAttributeTranslation

getAuditedBOTranslation

getAuditedValueRelation

getBOTypeTranslation

getCurrentDate

getCurrentTime

getCurrentTimeStamp

getCurrentUserld

getMaximalTimeStamp

getMaximalDate

getParameter

getValuesetTranslation

if, case and coalesce

trimLeft

isValid

max

min

month

round

size

substring

sum

trim

trimRight

replaceFromEnd

unit conversion

translate

valueset

year