newPositiveAttributeFilter()
Home > @gooddata/sdk-model > newPositiveAttributeFilter
newPositiveAttributeFilter() function
Creates a new positive attribute filter.
Signature:
export declare function newPositiveAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, inValues: IAttributeElements | string[], localIdentifier?: string): IPositiveAttributeFilter;
Parameters
Parameter | Type | Description |
---|---|---|
attributeOrRef | IAttribute | ObjRef | Identifier | either instance of attribute to create filter for or ref or identifier of attribute's display form |
inValues | IAttributeElements | string[] | values to filter for; these can be either specified as AttributeElements object or as an array of attribute element _values_; if you specify empty array, then the filter will be noop and will be ignored |
localIdentifier | string | (Optional) |
Returns:
Remarks
NOTE: when specifying attribute element using URIs (primary keys), please keep in mind that they MAY NOT be transferable across workspaces. On some backends same element WILL have different URI in each workspace. In general we recommend using URIs only if your code retrieves them at runtime from backend using elements query or from the data view's headers. Hardcoding URIs is never a good idea, if you find yourself doing that, please consider specifying attribute elements by value