---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideList2 (g_list): クライアント

# GlideList2 (g_list): クライアント {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：17分

GlideList2 API には、リストをカスタマイズするためのメソッドが用意されています (v2)。

変数 `g_list` は、指定されたリストオブジェクトにアクセスするために使用されます。`g_list`変数は、関連リストフォームリンクの UI アクションでは使用できません。これは、リストフォームリンクの UI アクションで使用できます。

これらのメソッドは、UI コンテキストメニューと UI アクションで使用されます。

これらの方法のいくつかは ネクストエクスペリエンス UI フレームワーク で利用できます。詳細については、次を参照してください。 [GlideList (ネクストエクスペリエンス UI フレームワーク)](https://servicenow-prod.fluidtopics.net/_rvI0M6JNO1yBFyBt2AitQ#GlideListClientAPINEx "GlideList API は、ネクストエクスペリエンス UI フレームワークのリストをカスタマイズするメソッドを提供します。").

## GlideList2 - addFilter(文字列フィルター) {#ariaid-title2}

リストクエリフィルターに単一の用語を追加します。
{#r_GL2-addFilter_S__table_sgz_zpw_15__entry__3}{#r_GL2-addFilter_S__gList_parmDesc_filter}

| 名前 | タイプ | 説明 |
|-|-|-|
| フィルター | 文字列 | 標準の Glide 形式でエンコードされたクエリ文字列。「 [エンコードされたクエリ文字列」](https://www.servicenow.com/docs/access?context=c_EncodedQueryStrings&version=australia&pubname=australia-platform-user-interface&ft:locale=en-US)を参照してください。 |
[表 : 1. パラメーター]

{#r_GL2-addFilter_S__table_sgz_zpw_15} {#r_GL2-addFilter_S__table_tgz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 2. 返される内容]

{#r_GL2-addFilter_S__table_tgz_zpw_15}  

    g_list.addFilter("active=true");

## GlideList2 - get(オブジェクト DOMelement) {#ariaid-title3}

指定されたアイテムを含むリストの GlideList2 オブジェクトを返します。
{#r_GL2-get_O__table_ugz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| DOMelement | オブジェクト | GlideList2 オブジェクトが必要なリストの DOM 要素 ID。 |
[表 : 3. パラメーター]

{#r_GL2-get_O__table_ugz_zpw_15} {#r_GL2-get_O__table_vgz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| オブジェクト | GlideList2 オブジェクト、見つからない場合は null。 |
[表 : 4. 返される内容]

{#r_GL2-get_O__table_vgz_zpw_15}

## GlideList2:get(文字列 ListID) {#ariaid-title4}

指定されたリストの GlideList2 オブジェクトを返します。
{#r_GL2-get_S__table_ugz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| ListID | 文字列 | GlideList2 オブジェクトが必要なリスト ID。 |
[表 : 5. パラメーター]

{#r_GL2-get_S__table_ugz_zpw_15} {#r_GL2-get_S__table_vgz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| オブジェクト | GlideList2 オブジェクト、見つからない場合は null。 |
[表 : 6. 返される内容]

{#r_GL2-get_S__table_vgz_zpw_15}  

    function assignLabelActionViaLookupModal(tableName, listId) {
    	var list = GlideList2.get(listId);
    	if (!list)
    		return;

    	assignLabelViaLookup(tableName, sysIds, list.getView());
    }

## GlideList2:getChecked() {#ariaid-title5}

関連付けられたリストでチェックされているアイテムのsys_idsのカンマ区切りリストを返します。
{#r_GL2-getChecked__table_wgz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 7. パラメーター]

{#r_GL2-getChecked__table_wgz_zpw_15} {#r_GL2-getChecked__table_xgz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストでチェックされているアイテムのsys_idsのカンマ区切りリスト。返されたアイテムの実行が許可されているかどうかをチェックして判断しません。 |
[表 : 8. 返される内容]

{#r_GL2-getChecked__table_xgz_zpw_15}  

    function removeLabelActionViaLookupModal(tableName, listId) {
      var list = GlideList2.get(listId);
      if (!list)
        return;

      var sysIds = list.getChecked();
      if (!sysIds)
        return;

      removeLabelViaLookup(tableName, sysIds);
    }

## GlideList2:getFixedQuery() {#ariaid-title6}

固定クエリを返します。
固定クエリは、ブレッドクラムから削除できない (つまり、ユーザーに対して固定されている) クエリの部分です。これは、アプリケーションモジュールの sysparm_fixed_query パラメーターを含めることによって指定されます。{#r_GL2-getFixedQuery__gList_ph_getFixedQuery}
{#r_GL2-getFixedQuery__table_ygz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 9. パラメーター]

{#r_GL2-getFixedQuery__table_ygz_zpw_15} {#r_GL2-getFixedQuery__table_zgz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストの固定クエリ文字列。 |
[表 : 10. 返される内容]

{#r_GL2-getFixedQuery__table_zgz_zpw_15}  

    var list = GlideList2.get(container.readAttribute('list_id'));
    var filter = this._getFilter(element);
    var fixedQuery = list.getFixedQuery();
    if (fixedQuery)
      filter = fixedQuery + "^" + filter;

## GlideList2:getGroupBy() {#ariaid-title7}

リストのグループ化に使用されるフィールドまたはカンマ区切りのフィールドリストを返します。
{#r_GL2-getGroupBy__table_ahz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 11. パラメーター]

{#r_GL2-getGroupBy__table_ahz_zpw_15} {#r_GL2-getGroupBy__table_bhz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストをグループ化するために使用されるフィールドまたはカンマ区切りのフィールドリスト。 |
[表 : 12. 返される内容]

{#r_GL2-getGroupBy__table_bhz_zpw_15}  

    function runFilterV2Lists(name, filter) {
      var list = GlideList2.get(name);	
        if (list) {
          var groupBy = list.getGroupBy();
          if (groupBy)  
            filter += "^" + groupBy;
    		
            list.setFilterAndRefresh(filter);
        }
    }

## GlideList2:getListName() {#ariaid-title8}

リストの名前 (通常はテーブル名) を返します。
{#r_GL2-getListName__table_chz_zpw_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 13. パラメーター]

{#r_GL2-getListName__table_chz_zpw_15} {#r_GL2-getListName__table_dhz_zpw_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リスト名 (通常はテーブル名)。 |
[表 : 14. 返される内容]

{#r_GL2-getListName__table_dhz_zpw_15}  

    var list = GlideList2.get(name);	
    var listName = list.getListName();

## GlideList2:getOrderBy() {#ariaid-title9}

リストの順序付けに使用する最初のフィールドを返します。
{#r_GL2-getOrderBy__table_qs2_nww_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 15. パラメーター]

{#r_GL2-getOrderBy__table_qs2_nww_15} {#r_GL2-getOrderBy__table_rs2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストを並べ替えるフィールド。リストが順序付けされていない場合は空です。 |
[表 : 16. 返される内容]

{#r_GL2-getOrderBy__table_rs2_nww_15}  

    var list = GlideList2.get(listId);
    if (!list)
      return;
    var orderBy = list.getOrderBy();

## GlideList2:getParentTable() {#ariaid-title10}

関連リストの親テーブル (フォームに関連付けられたテーブル) の名前を返します。
{#r_GL2-getParentTable__table_ss2_nww_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 17. パラメーター]

{#r_GL2-getParentTable__table_ss2_nww_15} {#r_GL2-getParentTable__table_ts2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 親テーブル名。 |
[表 : 18. 返される内容]

{#r_GL2-getParentTable__table_ts2_nww_15}  

    for (var id in GlideLists2) {
      var list = GlideLists2[id];
      if (list.getTableName() == listTableName && list.getParentTable() == tableName)
        return list.getContainer();
    }

## GlideList2 - getQuery(ブール値 orderBy, ブール値 groupBy, ブール値固定, ブール値すべて) {#ariaid-title11}

リストのエンコードされたクエリ文字列を返します。
{#r_GL2-getQuery_B_B_B_B__table_us2_nww_15__entry__3}{#r_GL2-getQuery_B_B_B_B__gList_parmDesc_orderByB}{#r_GL2-getQuery_B_B_B_B__gList_parmDesc_groupByB}{#r_GL2-getQuery_B_B_B_B__gList_parmDesc_fixed}{#r_GL2-getQuery_B_B_B_B__gList_parmDesc_all}

| 名前 | タイプ | 説明 |
|-|-|-|
| orderBy | ブーリアン | オプション。結果に orderBy を含めるかどうかを示すフラグ。 有効な値： * true:結果に orderBy を含めます。 * false:結果にorderBy を含めません。 {#r_GL2-getQuery_B_B_B_B__ul_awp_k1n_vrb} デフォルト値：false |
| groupBy | ブーリアン | オプション。結果に groupBy を含めるかどうかを示すフラグ。 有効な値： * true:結果に groupBy を含めます。 * false:結果に groupBy を含めません。 {#r_GL2-getQuery_B_B_B_B__ul_gpz_21n_vrb} デフォルト値：false |
| fixed | ブーリアン | オプション。結果に固定クエリを含めるかどうかを示すフラグ。 有効な値： * true:結果に固定クエリを含めます。 * false:結果に固定クエリを含めません。 {#r_GL2-getQuery_B_B_B_B__ul_e5s_11n_vrb} デフォルト値：false |
| すべて | ブーリアン | デフォルト。orderBy、groupBy、および固定クエリを結果に含めるかどうかを示すフラグ。 有効な値： * true:orderBy、groupBy、および固定クエリを結果に含めます。 * false:3 つのオプションすべてを結果に含めません。 {#r_GL2-getQuery_B_B_B_B__ul_ovz_pzm_vrb} デフォルト：true |
[表 : 19. パラメーター]

{#r_GL2-getQuery_B_B_B_B__table_us2_nww_15} {#r_GL2-getQuery_B_B_B_B__table_vs2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストのエンコードされたクエリ文字列。 |
[表 : 20. 返される内容]

{#r_GL2-getQuery_B_B_B_B__table_vs2_nww_15}  

    var list = GlideList2.get(this.listID);
    var ajax = new GlideAjax("AJAXJellyRunner", "AJAXJellyRunner.do");
      ajax.addParam("sysparm_query_encoded", list.getQuery({groupby: true, orderby: true}));
      ajax.addParam("sysparm_table", list.getTableName());
      ajax.addParam("sysparm_view", list.getView());

## GlideList2:getRelated() {#ariaid-title12}

関連リストを親フォームに関連付ける関連リストフィールドを返します。
{#r_GL2-getRelated__table_ws2_nww_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 21. パラメーター]

{#r_GL2-getRelated__table_ws2_nww_15} {#r_GL2-getRelated__table_xs2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストを親フォームに接続するフィールド。 |
[表 : 22. 返される内容]

{#r_GL2-getRelated__table_xs2_nww_15}  

    var list = GlideList2.get(name);
    var related = list.getRelated();
    if (related) 
      ajax.addParam("sysparm_is_related_list", "true");

## GlideList2:getTableName() {#ariaid-title13}

リストのテーブル名を返します。
{#r_GL2-getTableName__table_ys2_nww_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 23. パラメーター]

{#r_GL2-getTableName__table_ys2_nww_15} {#r_GL2-getTableName__table_zs2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストのテーブル名を返します。 |
[表 : 24. 返される内容]

{#r_GL2-getTableName__table_zs2_nww_15}  

    GlideList2.getListsForTable = function(table) {
        var lists = [];
        for (var id in GlideLists2) {
            var list = GlideLists2[id];
            if (list.getTableName() == table)
                lists.push(list);
        }
        return lists;
    }

## GlideList2:getView() {#ariaid-title14}

リストの表示に使用するビューを返します。
{#r_GL2-getView__table_llc_vmx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 25. パラメーター]

{#r_GL2-getView__table_llc_vmx_15} {#r_GL2-getView__table_mlc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | ビューの名前。 |
[表 : 26. 返される内容]

{#r_GL2-getView__table_mlc_vmx_15}  

    function assignLabelActionViaLookupModal(tableName, listId) {
    	var list = GlideList2.get(listId);
    	if (!list)
    		return;

    	assignLabelViaLookup(tableName, sysIds, list.getView());
    }

## GlideList2:getTitle() {#ariaid-title15}

リストのタイトルを返します。
{#r_GL2-getTitle__table_at2_nww_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 27. パラメーター]

{#r_GL2-getTitle__table_at2_nww_15} {#r_GL2-getTitle__table_bt2_nww_15__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | リストのタイトル。 |
[表 : 28. 返される内容]

{#r_GL2-getTitle__table_bt2_nww_15}  

    var list = GlideList2.get(name);	
    var listTitle = list.getTitle();

## GlideList2:isUserList() {#ariaid-title16}

リストメカニックを選択し、リストレイアウトを変更することによって、ユーザーがリストをカスタマイズした場合は true を返します。
{#r_GL2-isUserList__table_nlc_vmx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 29. パラメーター]

{#r_GL2-isUserList__table_nlc_vmx_15} {#r_GL2-isUserList__table_olc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | リストレイアウトが変更された場合は True。 |
[表 : 30. 返される内容]

{#r_GL2-isUserList__table_olc_vmx_15}  

    var list = GlideList2.get(listId);
    if (!list)
      return;
    if (list.isUserList())
      var tableName = list.getTableName();

## GlideList2 - refresh(Number firstRow, String additionalParms) {#ariaid-title17}

リストを更新します。リストフィルターの orderBy 部分は無視されるため、リストは更新時に自然な順序が使用されます。
{#r_GL2-refresh_N_S__table_plc_vmx_15__entry__3}{#r_GL2-refresh_N_S__gList_parmDesc_firstRowN}{#r_GL2-refresh_N_S__gList_parmDesc_addtl}

| 名前 | タイプ | 説明 |
|-|-|-|
| 最初の行 | 番号 | リストに表示される最初の行。 デフォルト:現在のビューの最初の行。 |
| additionalParms | 文字列 | リスト更新要求とともに送信されるオプションの名前と値のペア 。 |
[表 : 31. パラメーター]

{#r_GL2-refresh_N_S__table_plc_vmx_15} {#r_GL2-refresh_N_S__table_qlc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 32. 返される内容]

{#r_GL2-refresh_N_S__table_qlc_vmx_15}  

    $timeout(function() {
      if (GlideList.lists) {
        var list = GlideList.get(name);
        if (list) {
           if (sortBy) {
             if (sortDirection == 'ASC')
                list.sort(sortBy);
             else
                list.sortDescending(sortBy);
             }  
           list.refresh();
         }
       }
    }			

## GlideList2 - refreshWithOrderBy(数値、firstRow、文字列、説明) {#ariaid-title18}

リストを更新します。リストフィルターの orderBy 部分は、リストに指定されている場合に含まれます。
{#r_GL2-refreshWithOrderBy_N_S__table_rlc_vmx_15__entry__3}{#r_GL2-refreshWithOrderBy_N_S__gList_parmDesc_firstRowN}{#r_GL2-refreshWithOrderBy_N_S__gList_parmDesc_description}

| 名前 | タイプ | 説明 |
|-|-|-|
| 最初の行 | 番号 | リストに表示される最初の行。 デフォルト:現在のビューの最初の行。 |
| description | 文字列 | オプション リスト更新要求とともに送信される名前と値のペア。 |
[表 : 33. パラメーター]

{#r_GL2-refreshWithOrderBy_N_S__table_rlc_vmx_15} {#r_GL2-refreshWithOrderBy_N_S__table_slc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 34. 返される内容]

{#r_GL2-refreshWithOrderBy_N_S__table_slc_vmx_15}  

    ga.getXML(function(serverResponse) {
      var response = serverResponse.responseXML.getElementsByTagName("response")[0];
      if (response) {
        var list = GlideList2.getByName("backlog_stories");
        list.refreshWithOrderBy();
        var status = response.getAttribute('status');
        $j('html, body').animate({scrollTop: $j("#"+data.record.sys_id).offset().top},500);
        if (status == 'failure') {
          alert('${gs.getMessage("Story cannot be created. Team is not associated with any project.")}');
        }
      }
    }

## GlideList2 - setFilter(文字列フィルター) {#ariaid-title19}

クエリ文字列の orderBy 部分と groupBy 部分を無視して、リストのエンコードされたクエリ文字列を設定します。
{#r_GL2-setFilter_S__table_tlc_vmx_15__entry__3}{#r_GL2-setFilter_S__gList_parmDesc_filter}

| 名前 | タイプ | 説明 |
|-|-|-|
| フィルター | 文字列 | 標準の Glide 形式でエンコードされたクエリ文字列。「 [エンコードされたクエリ文字列」](https://www.servicenow.com/docs/access?context=c_EncodedQueryStrings&version=australia&pubname=australia-platform-user-interface&ft:locale=en-US)を参照してください。 |
[表 : 35. パラメーター]

{#r_GL2-setFilter_S__table_tlc_vmx_15} {#r_GL2-setFilter_S__table_ulc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 36. 返される内容]

{#r_GL2-setFilter_S__table_ulc_vmx_15}  

    list = GlideList2.get($(side+"ContentDivRelease").select(".list_div")[0].getAttribute("id"));
    if (list) {
      list.setFilter("active=true");
      list.refresh(1);
     }

## GlideList2 - setFilterAndRefresh(文字列フィルター) {#ariaid-title20}

指定されている場合は orderBy と groupBy を含む、リストのエンコードされたクエリ文字列を設定し、新しいフィルターを使用してリストを更新します。
{#r_GL2-setFilterAndRefresh_S__table_vlc_vmx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| フィルター | 文字列 | エンコードされたクエリ文字列。 |
[表 : 37. パラメーター]

{#r_GL2-setFilterAndRefresh_S__table_vlc_vmx_15} {#r_GL2-setFilterAndRefresh_S__table_wlc_vmx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 38. 返される内容]

{#r_GL2-setFilterAndRefresh_S__table_wlc_vmx_15}  

    function updateListFilter(projectID) {
      var list = GlideList2.getByName("backlog_stories");
      var fixedQuery = $('hdn_additional_filters').value;
      if(!projectID) {
          list.setFilterAndRefresh(fixedQuery + "^ORDERBYteam_index");
          list.setOrderBy("team_index");
      }
    }

## GlideList2 - setFirstRow(番号 rowNum) {#ariaid-title21}

リストが更新されたときにリストに表示される最初の行を設定します。
{#r_GL2-setFirstRow_N__table_uv1_k4x_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| 行番号 | 番号 | 表示する最初の行の行番号。 |
[表 : 39. パラメーター]

{#r_GL2-setFirstRow_N__table_uv1_k4x_15} {#r_GL2-setFirstRow_N__table_vv1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 40. 返される内容]

{#r_GL2-setFirstRow_N__table_vv1_k4x_15}  

    var nextRow = 0;
    var rowsPerPage = 20;
    var list = GlideList2.get(listId);
    if (!list)
      return;
    list.setFirstRow(nextRow);
    nextRow = nextRow + rowsPerPage;

## GlideList2:setGroupBy(文字列 groupBy) {#ariaid-title22}

単一フィールドのリスト groupBy 基準を設定します。
{#r_GL2-setGroupBy_S__table_wv1_k4x_15__entry__3}{#r_GL2-setGroupBy_S__gList_parmDesc_groupByS}

| 名前 | タイプ | 説明 |
|-|-|-|
| groupBy | 文字列 | リストの groupBy 基準。 |
[表 : 41. パラメーター]

{#r_GL2-setGroupBy_S__table_wv1_k4x_15} {#r_GL2-setGroupBy_S__table_xv1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 42. 返される内容]

{#r_GL2-setGroupBy_S__table_xv1_k4x_15}  

    function runContextAction(listId) {
      var g_list = GlideList2.get(listId);
      g_list.setGroupBy('');
      g_list.refresh(1);
    }

## GlideList2:setOrderBy(文字列 orderBy) {#ariaid-title23}

リストの orderBy 基準を設定します。
単一の順番フィールドの場合は、 orderBy フィールドまたは orderByDesc フィールドを使用します。 複数のフィールドの場合は、 `orderByField1^orderByField2^orderByField3` を使用します。 orderBy は昇順を指定し、orderByDesc は降順を指定します。これらのプリフィックス文字列はオプションです。指定しない場合は、 orderBy がデフォルトの順序になります。
{#r_GL2-setOrderBy_S__table_yv1_k4x_15__entry__3}{#r_GL2-setOrderBy_S__gList_parmDesc_orderByS}

| 名前 | タイプ | 説明 |
|-|-|-|
| orderBy | 文字列 | 単一または複数の orderBy フィールド。 |
[表 : 43. パラメーター]

{#r_GL2-setOrderBy_S__table_yv1_k4x_15} {#r_GL2-setOrderBy_S__table_zv1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 44. 返される内容]

{#r_GL2-setOrderBy_S__table_zv1_k4x_15}  

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                updateOrderBy: function(orderBy){
      var list = GlideList2.get(this.listID);
      if (list)
        list.setOrderBy(orderBy);
    };

## GlideList2 - setRowsPerPage(行数) {#ariaid-title24}

表示するページあたりの行数を設定します。
{#r_GL2-setRowsPerPage_N__table_aw1_k4x_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| rows | 番号 | 表示する行数。 |
[表 : 45. パラメーター]

{#r_GL2-setRowsPerPage_N__table_aw1_k4x_15} {#r_GL2-setRowsPerPage_N__table_bw1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 46. 返される内容]

{#r_GL2-setRowsPerPage_N__table_bw1_k4x_15}  

    link: function(scope) {
      var list = GlideList2.get(scope.listId);
      list.setRowsPerPage(scope.maxRows);
      list.setFilterAndRefresh(scope.tableQuery);
    }

## GlideList2:showHideGroups (ブール値、showFlag) {#ariaid-title25}

リスト内のすべてのグループを表示または非表示にし、グループの現在の折りたたみ/展開状態をユーザー設定として保存します。
{#r_GL2-showHideGroups_B__table_cw1_k4x_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| showFlag | ブーリアン | true の場合、リスト内のグループが表示されます。 |
[表 : 47. パラメーター]

{#r_GL2-showHideGroups_B__table_cw1_k4x_15} {#r_GL2-showHideGroups_B__table_dw1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 48. 返される内容]

{#r_GL2-showHideGroups_B__table_dw1_k4x_15}  

    function showHideAllGroups(showFlag) {
      var list = GlideList2.get(listId);
      if (!list)
        return;
      list.showHideGroups(showFlag);
    }

## GlideList2:showHideList(ブール値:showFlag) {#ariaid-title26}

リストを表示または非表示にし、リストの現在の折りたたみ/展開状態をユーザー設定として保存します。
{#r_GL2-showHideList_B__table_ew1_k4x_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| showFlag | ブーリアン | true の場合、リストが表示されます。 |
[表 : 49. パラメーター]

{#r_GL2-showHideList_B__table_ew1_k4x_15} {#r_GL2-showHideList_B__table_fw1_k4x_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 50. 返される内容]

{#r_GL2-showHideList_B__table_fw1_k4x_15}  

    GlideList2.toggleAll = function(expandFlag) {
    for (var id in GlideLists2) {
      var list = GlideLists2[id];
    list.showHideList(expandFlag);
    }

## GlideList2 - sort(文字列フィールド) {#ariaid-title27}

リストを昇順でソートし、フィールドを orderBy 列として設定します。
{#r_GL2-sort_S__table_uks_xpx_15__entry__3}{#r_GL2-sort_S__gList_parmDesc_field}

| 名前 | タイプ | 説明 |
|-|-|-|
| フィールド | 文字列 | リストをソートするために使用するフィールド。 |
[表 : 51. パラメーター]

{#r_GL2-sort_S__table_uks_xpx_15} {#r_GL2-sort_S__table_vks_xpx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 52. 返される内容]

{#r_GL2-sort_S__table_vks_xpx_15}  

    $timeout(function() {
      if (GlideList.lists) {
        var list = GlideList.get(name);
        if (list) {
           if (sortBy) {
             if (sortDirection == 'ASC')
                list.sort(sortBy);
             else
                list.sortDescending(sortBy);
             }  
           list.refresh();
         }
       }
    }

## GlideList2 - sortDescending(文字列フィールド, 数値金額) {#ariaid-title28}

リスト内の単一のフィールドを降順でソートし、そのフィールドを orderByDescField 列として設定します。
{#r_GL2-sortDescending_S_N__table_wks_xpx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| フィールド | 文字列 | リストをソートするために使用するフィールド。 |
[表 : 53. パラメーター]

{#r_GL2-sortDescending_S_N__table_wks_xpx_15} {#r_GL2-sortDescending_S_N__table_xks_xpx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 54. 返される内容]

{#r_GL2-sortDescending_S_N__table_xks_xpx_15}  

    $timeout(function() {
      if (GlideList.lists) {
        var list = GlideList.get(name);
        if (list) {
           if (sortBy) {
             if (sortDirection == 'ASC')
                list.sort(sortBy);
             else
                list.sortDescending(sortBy);
             }  
           list.refresh();
         }
       }
    }

## GlideList2:toggleList() {#ariaid-title29}

リストの表示を切り替え、リストの現在の折りたたみ/展開状態をユーザー設定として保存します。
{#r_GL2-toggleList__table_yks_xpx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 55. パラメーター]

{#r_GL2-toggleList__table_yks_xpx_15} {#r_GL2-toggleList__table_zks_xpx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 56. 返される内容]

{#r_GL2-toggleList__table_zks_xpx_15}  

    var list = GlideList2.get(listId);
    if (!list)
      return;
    list.toggleList();

## GlideList2:toggleListNoPref() {#ariaid-title30}

リストの表示を切り替えますが、リストの現在の折りたたみ/展開状態はユーザー設定として保存されません。
{#r_GL2-toggleListNoPref__table_als_xpx_15__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 57. パラメーター]

{#r_GL2-toggleListNoPref__table_als_xpx_15} {#r_GL2-toggleListNoPref__table_bls_xpx_15__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 58. 返される内容]

{#r_GL2-toggleListNoPref__table_bls_xpx_15}  

    var list = GlideList2.get(listId);
    if (!list)
      return;
    list.toggleListNoPref();


