Date range must be specified if the selector has conditions or ordering for a stat field. Note that only the last date range specified for the selector will take effect.
Sets a custom date range onto the selector. Both parameters can be either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD form. For instance, March 24th, 2013 is represented as either {year: 2013, month: 3, day: 24} or "20130324". The date range is inclusive on both ends, so forDateRange("20130324", "20130324") sets the range of one day.
Date range must be specified if the selector has conditions or ordering for a stat field. Note that only the last date range specified for the selector will take effect.
The results will be ordered by metrics.clicks in descending order. Results with equal metrics.clicks value will be ordered by metrics.ctr in ascending order.
All specified conditions are AND-ed together. The above example will retrieve entities that observed over 100 metrics.impressions AND more than 5 clicks.
The parameter to be passed into this method must be of the following form:
"COLUMN_NAME OPERATOR VALUE"
Operators
The operator that can be used in a condition depends on the type of column.
For Integer and Long columns (e.g. metrics.clicks and metrics.impressions):
< <= > >= = !=
For Double columns (e.g. metrics.ctr):
< >
For String columns (e.g. campaign.name):
= != (NOT) (LIKE | CONTAINS | REGEXP_MATCH)
For Enumeration columns (ones that can only take one value from a predefined list, such as Status):
= != IN () NOT IN ()
For StringSet columns (e.g. campaign.labels):
CONTAINS ALL () CONTAINS ANY () CONTAINS NONE ()
Conditions using IN, NOT IN, CONTAINS ALL, CONTAINS ANY and CONTAINS NONE operators look as follows:
withCondition("resource.column_name IN (Value1, Value2)")
Columns
All column names are case-sensitive, and so are all values of enumerated columns (such as Status).
The resulting selector can be further refined by applying additional conditions to it. The ID-based condition will then be AND-ed together with all the other conditions, including any other ID-based conditions. So, for instance, the following selector:
The resulting selector can be further refined by applying additional conditions to it. The resource name condition will then be AND-ed together with all the other conditions.
The selector can only support up to 10,000 resource names. If more than 10,000 resource names are specified, the corresponding get() call will fail with a runtime error.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-04 UTC."],[[["Fetches mobile apps and provides an iterator for accessing them."],["Supports filtering by ID, resource name, and various attributes using `withCondition()`, `withIds()`, and `withResourceNames()`."],["Enables sorting results based on different columns with `orderBy()`."],["Allows limiting the number of returned entities with `withLimit()`."],["Can fetch legacy or upgraded mobile apps specifically using `withOnlyLegacy()` or `withOnlyUpgraded()`."]]],[]]