# コンボボックスのフィルタリング

## リバインディングを通じたコンボボックスのフィルタリング

[Run  example](http://oz.ozeform.io/oz/samples/combobox-filtering.html)

{% embed url="<https://youtu.be/P1euj-oROkk>" %}

{% file src="<https://1097513732-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LwWWN-Gla4aA9ONdCK6%2F-M4IhC1GH1L1bCDPevB0%2F-M4IhK2F40ZtGK1JVqRi%2Fsamples-combobox-filtering.zip?alt=media&token=5484a08d-afa8-472c-a6f4-d15a3c80fe3f>" %}
samples-combobox-filtering.zip
{% endfile %}

## **リバインディングせずにフィルタリングする場合**

[Run example](http://oz.ozeform.io/oz/samples/combobox-filtering-all.html)

{% file src="<https://1097513732-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LwWWN-Gla4aA9ONdCK6%2F-M4IhC1GH1L1bCDPevB0%2F-M4Ihl7IMX5FMv6NUxtR%2FFiltering-No-ReBind.zip?alt=media&token=d87a9b1d-7ced-481d-a627-2c8c64a669c0>" %}
filtering-no-rebind.zip
{% endfile %}

## JSONタイプのファイルリング <a href="#filtering-with-json" id="filtering-with-json"></a>

```javascript
<script type="text/javascript" >
var serverUrl = "https://" + location.host;
var productLine = "[\n{\"productLine\":\"Bib-Shorts\"},\n{\"productLine\":\"Bottles and Cages\"},\n{\"productLine\":\"Bottom Brackets\"}\n]";
var productName = "[\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, L\"\n  },\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, S\"\n  },\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, M\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Mountain Bottle Cage\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Road Bottle Cage\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Water Bottle - 30 oz.\"\n  },\n  {\n    \"productLine\": \"Bottom Brackets\",\n    \"productName\": \"LL Bottom Bracket\"\n  },\n  {\n    \"productLine\": \"Bottom Brackets\",\n    \"productName\": \"HL Bottom Bracket\"\n  }\n]";
function SetOZParamters_OZViewer(){
	var oz = document.getElementById("OZViewer");
	oz.sendToActionScript("information.debug", "true");
	oz.sendToActionScript("connection.servlet",serverUrl + "/oz/server");
	oz.sendToActionScript("connection.reportname","/samples/combobox-filtering-json.ozr");
	oz.sendToActionScript("connection.pcount", "2");
	oz.sendToActionScript("connection.args1", "productLine=" + productLine);
	oz.sendToActionScript("connection.args2", "productName=" + productName);
	return true;
}
start_ozjs("OZViewer", serverUrl + "/oz/HTML5viewer/");
</script>
```

​[Run example](http://oz.ozeform.io/oz/samples/combobox-filtering-json.html)

{% file src="<https://1097513732-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LwWWN-Gla4aA9ONdCK6%2F-M4IhxuRnIR3cXlHEnaP%2F-M4IiAvMn5M9ePv7hrEX%2Fcombobox-filtering-json.zip?alt=media&token=444be85f-a1ed-4eba-9edc-d26359bc11c1>" %}
combobox-filtering-json.zip
{% endfile %}
