Skip to main content

URL Filter

The Flaremap JS URL can be used for creating impromptu filters that are not defined in the application. This URL filter allows users to quickly and easily create new filters by simply updating the URL anchor. Important to note, URL filters act like native filters – i.e. URL filters are applied after the data is loaded into the application. For instance, the application will prepare the min/max values of a slider with the original dataset in mind – before applying any URL filters.

No parameter needs to be added to the config file to use this feature.

To use a URL filter, simply use the following format to append the base URL of the application (URL filters follow the same {filter_spec} as pre-filters):

{base_url}#urlfilter1[.{orGroup}]={filter_spec1}&urlfilterN[.{orGroup}]={filter_specN}

note

By default, multiple URL filters have an AND relationship; i.e. only results that match all of the URL filter rules will be returned.

{base_url}The core URL of the application. For example: http://www.company.com/flaremap/application.html
{orGroup}Optional. When used, URL filters with matching {orGroup}s will have an OR relationship – i.e. results that match any of the URL filters with common {orGroup}s will be returned. The value of {orGroup} can be any unique string.
{filter_spec}Specifies the URL filter to apply. See {filter_spec} table below for format.

{filter_spec}

Value: {value_name}|{operation}|{operation_values}

{filter_spec} itemValueExplanation
{value_name}Any attribute from “CSV_DataTypes.cells”Specifies the attribute that will be used to filter the data.
{operation}See table below for list of operationsSpecifies the operation used to define group membership
{operation_values}See table below for how different operations require different valuesSpecifies what values the operation uses to determine group membership

Group operations and values

Description{operation}{operation_values}
equalsEQAny number or string. Will only return results that exactly match the value. Use HASTEXT for more granular text searching.
not equalsNEQAny number or string. Will only return results that exactly match the value. Use HASTEXT for more granular text searching.
less thanLTAny number
less than or equalsLTEAny number
greater thanGTAny number
greater than or equalsGTEAny number
set membership (in a set)SETAny pipe separated list of numbers or strings. Will only return results that exactly match the value. Use HASTEXT for more granular text searching. Values within SET have an OR relationship.
from (inclusive)... to (inclusive)[]Any two pipe separated numbers (the second should be larger than the first)
from (not inclusive)... to (inclusive)(]Any two pipe separated numbers (the second should be larger than the first)
from (inclusive)... to (not inclusive)[)Any two pipe separated numbers (the second should be larger than the first)
from (not inclusive)... to (not inclusive)()Any two pipe separated numbers (the second should be larger than the first)
text searchHASTEXTAny pipe separated list of numbers or strings. Will return any results that match the value, including partial matches. For example “Dan” will return: “Dan”, “Daniel”, and “Dan Smith”.
adding an exclamation point immediately before any of the operations above will negate the filter rule!n/a

Examples:

http://www.company.com/flaremap/application.html#urlfilter1=Sales_Region\|EQ\|southeast

http://www.company.com/flaremap/application.html#urlfilter1=Sales_Region\|EQ\|southeast&urlfilter2=Quota_Percent\|GTE\|100

http://www.company.com/flaremap/application.html#urlfilter1=Sales_Region\|HASTEXT\|north\|south

http://www.company.com/flaremap/application.html#urlfilter1.groupA=Sales_Region\|EQ\|southeast&urlfilter2.groupA=Sales_Manager\|EQ\|Jennifer Artz