GlideListV3 (g_list) - Client (deprecated)

  • Versão de lançamento: Australia
  • Atualizado 12 de mar. de 2026
  • 7 min. de leitura
  • The GlideListV3 API provides methods to manipulate lists.

    You access the GlideListV3 methods by using the g_list global object. These methods are used in UI context menus and UI actions. The g_list object is not available for related lists on the form link UI action.

    Nota:

    This API is no longer supported. Consider using the GlideList2() API instead.

    GlideListV3 - addFilter(String filter)

    Adds a single term to the list query filter.

    Tabela 1. Parameters
    Name Type Description
    filter String Query string condition to add.
    Tabela 2. Returns
    Type Description
    void

    GlideListV3 - get(String listId)

    Returns the GlideList object for specified list.

    Tabela 3. Parameters
    Name Type Description
    listId String The list name.
    Tabela 4. Returns
    Type Description
    Object The GlideList object for the specified list, or null if not found.

    GlideListV3 - get(Object DomElement)

    Returns the GlideList object for the specified DOM element.

    Tabela 5. Parameters
    Name Type Description
    DomElement Object The DOM element ID for which you want the GlideList object.
    Tabela 6. Returns
    Type Description
    Object The GlideList object for the specified DOM element. Returns null if the DOM element is not found.

    GlideListV3 - getChecked()

    Returns a comma-separated list of sys_ids for checked items in the list. Does not return items that are not allowed to be executed.

    Tabela 7. Parameters
    Name Type Description
    None
    Tabela 8. Returns
    Type Description
    String Comma-separated list of the sys_ids for checked items in the list. Does not return items that are not allowed to be executed.

    GlideListV3 - getFixedQuery()

    Returns the sysparm_fixed query.

    The fixed query is the part of the query that cannot be removed from the breadcrumb (i.e., it is fixed for the user). It is specified by including a sysparm_fixed_query parameter for the application module.

    Tabela 9. Parameters
    Name Type Description
    None
    Tabela 10. Returns
    Type Description
    String The fixed query string for the list.

    GlideListV3 - getFormTarget()

    Returns the form's target attribute.

    Tabela 11. Parameters
    Name Type Description
    None
    Tabela 12. Returns
    Type Description
    String The form's target attribute.

    GlideListV3 - getGroupBy()

    Returns the field or comma-separated list of fields that are used to group the list.

    Tabela 13. Parameters
    Name Type Description
    None
    Tabela 14. Returns
    Type Description
    String The field or comma-separated list of fields used to group the list.

    GlideListV3 - getListName()

    Returns the name of the list, which is usually the table name.

    Tabela 15. Parameters
    Name Type Description
    None
    Tabela 16. Returns
    Type Description
    String The list name.

    GlideListV3 - getOrderBy()

    Returns the first field used to order the list.

    Tabela 17. Parameters
    Name Type Description
    None
    Tabela 18. Returns
    Type Description
    String The field used to order the list, or an empty string if the list is not sorted.

    GlideListV3 - getParentTable()

    Returns the name of the parent table (the table associated with the form).

    Tabela 19. Parameters
    Name Type Description
    None
    Tabela 20. Returns
    Type Description
    String The parent table name.

    GlideListV3 - getQuery(Object options)

    Returns the encoded query string for the list.

    Tabela 21. Parameters
    Name Type Description
    options Object The options can be one or more of the following.
    • orderby - include ORDERBY in the query
    • groupby - include GROUPBY in the query
    • fixed - include sysparm_fixed_query in the query
    • all - include all the options in the query
    Tabela 22. Returns
    Type Description
    String Encoded query string for the list.

    GlideListV3 - getReferringUrl()

    Returns the referring URL.

    Tabela 23. Parameters
    Name Type Description
    None
    Tabela 24. Returns
    Type Description
    String Returns the parent form's URL, or '*' if there is no parent form.

    GlideListV3 - getRelated()

    Returns the related list field that associates the related list to the parent form.

    Tabela 25. Parameters
    Name Type Description
    None
    Tabela 26. Returns
    Type Description
    String Field that connects the list to the parent form.

    GlideListV3 - getRelatedListType()

    Returns the related list type.

    Tabela 27. Parameters
    Name Type Description
    None
    Tabela 28. Returns
    Type Description
    String The relationship table type.

    GlideListV3 - getRelationshipId()

    Returns the relationship record id, if this is type REL related list.

    Tabela 29. Parameters
    Name Type Description
    None
    Tabela 30. Returns
    Type Description
    String The sys_id of the relationship record.

    GlideListV3 - getRowCount()

    Returns the number of rows returned by the query.

    Tabela 31. Parameters
    Name Type Description
    None
    Tabela 32. Returns
    Type Description
    Number The number of rows returned by the query.

    GlideListV3 - getRowsPerPage()

    Returns the number of rows to be displayed on a page.

    Tabela 33. Parameters
    Name Type Description
    None
    Tabela 34. Returns
    Type Description
    Number The number of rows to be displayed on a page.

    GlideListV3 - getTableName()

    Returns the table name of the list.

    Tabela 35. Parameters
    Name Type Description
    None
    Tabela 36. Returns
    Type Description
    String The list's table name.

    GlideListV3 - getTitle()

    Returns the list title.

    Tabela 37. Parameters
    Name Type Description
    None
    Tabela 38. Returns
    Type Description
    String The list title.

    GlideListV3 - getView()

    Returns the view used to display the list.

    Tabela 39. Parameters
    Name Type Description
    None
    Tabela 40. Returns
    Type Description
    String The name of the view

    GlideListV3 - isUserList()

    Returns true if the list has been personalized by the user.

    Tabela 41. Parameters
    Name Type Description
    None
    Tabela 42. Returns
    Type Description
    Boolean True if the list layout has changed.

    GlideListV3 - refresh(Number firstRow, Object additionalParams)

    Refreshes the list. The orderBy part of the list filter is ignored so that the list's natural ordering is used.

    Tabela 43. Parameters
    Name Type Description
    firstRow Number (Optional) The first row to display in the list. If not specified, the list's current first row is used.
    additionalParams Object (Optional) Name- value pairs that are submitted with the list refresh request.
    Tabela 44. Returns
    Type Description
    void

    GlideListV3 - refreshWithOrderBy(Number firstRow, Object additionalParams)

    Refreshes the list using the orderBy fields.

    Tabela 45. Parameters
    Name Type Description
    firstRow Number (Optional) The first row to display in the list. If not specified, the list's current first row is used.
    additionalParams Object (Optional) Name- value pairs that are submitted with the list refresh request.
    Tabela 46. Returns
    Type Description
    void

    GlideListV3 - setFilter(String filter, Boolean saveOrderBy, Boolean saveGroupBy)

    Sets the encoded query string for the list ignoring the orderBy and groupBy parts of the query string.

    Tabela 47. Parameters
    Name Type Description
    filter String An encoded query string.
    saveOrderBy Boolean The default is false. When true uses the orderBy part of the query.
    saveGroupBy Boolean The default is false. When true uses the groupBy part of the query.
    Tabela 48. Returns
    Type Description
    void

    GlideListV3 - setFilterAndRefresh( String filter)

    Sets the encoded query string for the list, and then refreshes the list using the new filter.

    This preserves the groupby and orderby parameters.

    Tabela 49. Parameters
    Name Type Description
    filter String Encoded query string.
    Tabela 50. Returns
    Type Description
    void

    GlideListV3 - setFirstRow(Number firstRow)

    Sets the first row to be displayed when the list is refreshed.

    Tabela 51. Parameters
    Name Type Description
    firstRow Number The row number in the list.
    Tabela 52. Returns
    Type Description
    void

    GlideListV3 - setFormTarget(String target)

    Specifies where to display the response from the form.

    Tabela 53. Parameters
    Name Type Description
    target String The form.target attribute value to use.
    Tabela 54. Returns
    Type Description
    void

    GlideListV3 - setGroupBy(String groupBy)

    Sets the groupBy criteria for the list, for a single field or multiple fields.

    For a single field, use field or groupByField. The groupBy prefix is optional. For multiple fields use field1^field2^field3 or groupByField1^groupByField2^groupByField3.

    Tabela 55. Parameters
    Name Type Description
    String groupBy The group by criteria for the list.
    Tabela 56. Returns
    Type Description
    void

    GlideListV3 - setOrderBy(String orderBy)

    Sets the orderBy criteria for the list.

    For a single order by field use orderBy field or orderByDescField. For multiple fields, use orderByField1^orderByField2^orderByField3. orderBy specifies ascending order and orderByDesc specifies descending. These prefix strings are optional. If not specified orderBy is assumed.

    Tabela 57. Parameters
    Name Type Description
    orderBy String Single or multiple order by fields.
    Tabela 58. Returns
    Type Description
    void

    GlideListV3 - setReferringUrl(String url)

    Sets the parent form referring url.

    Tabela 59. Parameters
    Name Type Description
    url String The parent form's URL
    Tabela 60. Returns
    Type Description
    void

    GlideListV3 - setRowsPerPage(Number numRows)

    Set the number of rows to display on a page.

    Tabela 61. Parameters
    Name Type Description
    numRows Number The number of rows to display on a page.
    Tabela 62. Returns
    Type Description
    void

    GlideListV3 - showHideGroups(Boolean showFlag)

    Displays or hides all of the groups within the list and saves the current collapsed/expanded state of the groups as a user preference.

    Tabela 63. Parameters
    Name Type Description
    showFlag Boolean When true, displays the groups within the list.
    Tabela 64. Returns
    Type Description
    void

    GlideListV3 - showHideList(Boolean showFlag)

    Displays or hides the list and saves the current collapsed/expanded state of the list as a user preference.

    Tabela 65. Parameters
    Name Type Description
    showFlag Boolean When true, displays the list.
    Tabela 66. Returns
    Type Description
    void

    GlideListV3 - sort(String field)

    Sort the list in ascending order.

    Tabela 67. Parameters
    Name Type Description
    field String The field to be used to sort the list.
    Tabela 68. Returns
    Type Description
    void

    GlideListV3 - sortDescending(String field)

    Sorts the list in descending order.

    Tabela 69. Parameters
    Name Type Description
    field String The field used to sort the list.
    Tabela 70. Returns
    Type Description
    void

    GlideListV3 - toggleList()

    Toggles the list display between collapsed and expanded, and saves the state as a user preference.

    Tabela 71. Parameters
    Name Type Description
    None
    Tabela 72. Returns
    Type Description
    void

    GlideListV3 - toggleListNoPref()

    Toggles the list display between collapsed and expanded, but does not save the state as a user preference.

    Tabela 73. Parameters
    Name Type Description
    None
    Tabela 74. Returns
    Type Description
    void