Asset Functions

< All Topics

ASSET_ID

{{ ASSET_ID }}

Inserts the BLAM Asset ID.


ASSET_TITLE

{{ ASSET_TITLE }}

Inserts the BLAM Asset Title.


ASSET_COMMENT

{{ ASSET_COMMENT(type) }}

{{ ASSET_COMMENT(1, startsAtTimecode) }}

{{ ASSET_COMMENT(1, startsAtMillisecond) }}

{{ ASSET_COMMENT(1, finishedAtTimecode) }}

{{ ASSET_COMMENT(1, finishedAtMillisecond) }}

{{ ASSET_COMMENT(1, type) }}

{{ ASSET_COMMENT(1, title) }}

{{ ASSET_COMMENT(1, text) }}

Inserts the specified asset comment. The first argument specifies the comment number whilst the second corresponds to the comment field. If no comment number is provided then the first comment is selected by default.


ASSET_CREATED_DATE

{{ ASSET_CREATED_DATE }}

{{ ASSET_CREATED_DATE(MM/dd/yy) }}

Inserts the datetime the asset was created. An optional argument can be provided to specify the output format. If no argument is provided the function will generate the datetime using the ISO format: ‘yyyy-MM-dd hh:mm:ss’


ASSET_VERSION_CREATED_DATE

{{ ASSET_VERSION_CREATED_DATE }}

{{ ASSET_VERSION_CREATED_DATE(yyyy-MM-dd) }}

Inserts the datetime the asset version was created. An optional argument can be provided to specify the output format. If no argument is provided the function will generate the datetime using the ISO format: ‘yyyy-MM-dd hh:mm:ss’


metadata_fieldname

{{ metadata_fieldname }}

Inserts the string equivalent of the provided metadata fieldname. The valid metadata fieldnames are defined in the BLAM instance’s metadata schema.


FORMAT_DATE

{{ FORMAT_DATE(metadata_fieldname, dd MMM yy) }}

Outputs datetime metadata fields with the provided format. The metadata field must be a datetime type. Both input arguments must be provided.


FORMAT_TIMECODE

{{ FORMAT_TIMECODE(metadata_fieldname, f) }}

{{ FORMAT_TIMECODE(metadata_fieldname, ms) }}

{{ FORMAT_TIMECODE(metadata_fieldname, milliseconds) }}

{{ FORMAT_TIMECODE(metadata_fieldname, s) }}

{{ FORMAT_TIMECODE(metadata_fieldname, ss) }}

{{ FORMAT_TIMECODE(metadata_fieldname, sec) }}

{{ FORMAT_TIMECODE(metadata_fieldname, seconds) }}

{{ FORMAT_TIMECODE(metadata_fieldname, m) }}

{{ FORMAT_TIMECODE(metadata_fieldname, mm) }}

{{ FORMAT_TIMECODE(metadata_fieldname, min) }}

{{ FORMAT_TIMECODE(metadata_fieldname, minutes) }}

{{ FORMAT_TIMECODE(metadata_fieldname, h) }}

{{ FORMAT_TIMECODE(metadata_fieldname, hh) }}

{{ FORMAT_TIMECODE(metadata_fieldname, hr) }}

{{ FORMAT_TIMECODE(metadata_fieldname, hours) }}

Outputs timecode metadata fields with the provided format. The metadata field must be a timecode type. Both input arguments must be provided.


COST

{{ COST }}

{{ COST(Query, serviceName=*S3*) }}

{{ COST(Currency, USD) }}

{{ COST(TransactionType, Sale) }}

{{ COST(DateRange, CURRENT_DATETIME_ADDDAYS, -90) }}

{{ COST(DateRange, CURRENT_WEEK) }}

{{ COST(DateRange, PREVIOUS_WEEK) }}

{{ COST(DateRange, CURRENT_MONTH) }}

{{ COST(DateRange, PREVIOUS_MONTH) }}

{{ COST(DateRange, CURRENT_QUARTER) }}

{{ COST(DateRange, PREVIOUS_QUARTER) }}

{{ COST(DateRange, CURRENT_YEAR) }}

{{ COST(DateRange, PREVIOUS_YEAR) }}

{{ COST(StartDate, CURRENT_DATETIME) }}

{{ COST(StartDate, CURRENT_DATETIME_ADDDAYS, -30) }}

{{ COST(StartDate, CURRENT_DATETIME_ADDWEEKS, -4) }}

{{ COST(StartDate, CURRENT_DATETIME_ADDMONTHS, -1) }}

{{ COST(StartDate, CURRENT_DATETIME_ADDYEARS, -1) }}

{{ COST(EndDate, CURRENT_DATETIME) }}

{{ COST(EndDate, CURRENT_DATETIME_ADDDAYS, -30) }}

{{ COST(EndDate, CURRENT_DATETIME_ADDWEEKS, -4) }}

{{ COST(EndDate, CURRENT_DATETIME_ADDMONTHS, -1) }}

{{ COST(EndDate, CURRENT_DATETIME_ADDYEARS, -1) }}

Example combination

{{ COST(Query, serviceName=*Media Convert*, DateRange, CURRENT_QUARTER, Currency, USD, TransactionType, Purchase) }}

Outputs the total cost for the asset by querying the BLAM Cost Tracking API. By default will return the total cost tracked for the entire asset lifetime for each currency the asset has a cost tracked against. Optional arguments can be provided to refine the result by specifying a ‘Query’, ‘Currency’ (USD/EUR etc.), ‘TransactionType’ (Sale/Purchase) and ‘DateRange’.
N.B BLAM does not include currency FX. Passing a ‘Currency’ argument filters out results returned against other currencies.