RQL can be used to query all metadata fields. How you search against them depends directly on the data type of the metadata field, such as String, Boolean, Date, etc. Metadata RQL queries can be used in conjunction with asset-based queries.
Metadata fields are queried in RQL by using their distinct name value, as seen in this image:
The following examples are available when using RQL for Metadata.
BOOLEAN
hasProxy = true OR hasProxy = false
hasProxy is null OR hasProxy is not null
TEXT - SMALL vs LARGE Text types query the same
hLSURL = ‘reach.com’ OR hLSURL like ‘reach.com’
hLSURL is null OR hLSURL is not null
CALENDAR
Note that default metadata such as "dateCreated" and "dateUpdated" can also be queried using the following parameters.
holiday lt ‘12-27-2019’ OR holiday gt ‘12-27-2019’
holiday lte ‘12-27-2019’ OR holiday gte ‘12-27-2019’
holiday between ‘12-24-2019’ and ‘12-26-2019'
holiday is null OR holiday is not null
holiday = today
holiday lt today OR holiday gt today
holiday lte today OR holiday gte today
LINK
homeVideoLicensingYoutubeURL is null
homeVideoLicensingYoutubeURL is not null
homeVideoLicensingYoutubeURL.title like 'mylinkname'
homeVideoLicensingYoutubeURL.url like 'www.levelsbeyond.com'
PICKLIST - SINGLE vs MULTIPLE picklist types query the same
Picklists are handled a little different via RQL and can be queried against in two different ways. Either by the Display Name of the picklist value, or by the ID or Key of the picklist value.
For example, within the Holiday picklist the Display Name Christmas has an ID value of 05355d15a40c41fbb2d4bfc4312267dd so here are some example queries:
holiday = '05355d15a40c41fbb2d4bfc4312267dd'
holiday like ‘Christmas’
holiday is null OR holiday is not null
Comments
0 comments
Please sign in to leave a comment.