Apply Filtering
The API has the ability to apply filtering on the Service.RunQuery facility. This is undertaken by passing in the applyFilter parameter, some examples can be seen below:
params.put("applyFilter", new Object[] { "=", "price", 5914 };
params.put("applyFilter", new Object[] { ">", "price", 5914 };
params.put("applyFilter", new Object[] { "<", "price", 5914 };
params.put("applyFilter", new Object[] { "<>", "ReportingSymbol", new String[] { "MSFT" } };
params.put("applyFilter", new Object[] { "=", "ReportingSymbol", new String[] { "MSFT" } };
params.put("applyFilter", new Object[] { "in, "ReportingSymbol", new String[] { "MSFT", "AAPL" } };
params.put("applyFilter", new Object[] { "like", "IssueName", "Microsoft Corporation Common Stockā };
The format in the API is as follows:
Note
Dictionary below shows where parameter field originated.
Map<String, Object> params = new HashMap<>();
params.put("applyFilter", new Object[] { [filter choice], [column], [value] };
if requiring to run multiple filters please use the following:
params.put("applyFilter", new Object[]{ new Object[] { [filter choice], [column], [value]}, new Object[] { [filter choice], [column], [value]} };