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

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

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

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

{% file src="/files/-M4IhK2F40ZtGK1JVqRi" %}
samples-combobox-filtering.zip
{% endfile %}

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

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

{% file src="/files/-M4Ihl7IMX5FMv6NUxtR" %}
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="/files/-M4IiAvMn5M9ePv7hrEX" %}
combobox-filtering-json.zip
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jp.ozeform.io/sanpuru/combobox-filtering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
