---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideTimeline - Global

# GlideTimeline - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 10 minutes to read

The GlideTimeline API provides the core implementation for configuring and displaying a Glide Windowing Toolkit Timeline.

For security, the GlideTimeline has already been instantiated as a single instance variable called <var class="keyword varname">GlideTimeline</var>. All configurations should be made in the client script section of the corresponding schedule page
that references this instance variable.

## GlideTimeline - groupByParent(Boolean b) {#ariaid-title2}

Specifies whether or not to group timeline items by their parent.
If true, this will nest all child items inside their parent. This affects
the ordering of display and children will always be listed immediately after their parent.
The default value for the groupByParent property is
false.
If true, this will nest all child items inside their parent. This affects
the ordering of display and children will always be listed immediately after their parent.
The default value for the groupByParent property is
false.
{#r_GTL-groupByParent_B__table_udp_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, displays Timeline Items grouped by parent. |
[Table 1. Parameters]

{#r_GTL-groupByParent_B__table_udp_mns_5t} {#r_GTL-groupByParent_B__table_vdp_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_GTL-groupByParent_B__table_vdp_mns_5t}  

    glideTimeline.groupByParent(true);

## GlideTimeline - registerEvent(String strServerEvent, String strScriptIncludeName) {#ariaid-title3}

Registers the specified Timeline server event.
The strServerEvent must be one of the allowed events for registration to work
correctly. When the event occurs, the GlideTimeline sends a request to
the server and processes the event as handled inside the
strScriptIncludeName class.
The strServerEvent must be one of the allowed events for registration to work
correctly. When the event occurs, the GlideTimeline sends a request to
the server and processes the event as handled inside the
strScriptIncludeName class.
{#r_GTL-registerEvent_S_S__table_opw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| strServerEvent | String | Specifies one of the following case-sensitive events: * getItems * elementMoveX * elementMoveY * elementMoveXY * elementSuccessor * elementTimeAdjustStart * elementTimeAdjustEnd * inputBox * itemMove |
| strScriptIncludeName | String | Specifies the name of the class to receive the strServerEvent. This class must be defined in a script include that extends AbstractTimelineSchedulePage. |
[Table 3. Parameters]

{#r_GTL-registerEvent_S_S__table_opw_v4s_5t} {#r_GTL-registerEvent_S_S__table_ppw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#r_GTL-registerEvent_S_S__table_ppw_v4s_5t}  

    glideTimeline.registerEvent("getItems", "TimelineGanttSchedulePage");

## GlideTimeline - setAutoRefresh(Number intSeconds) {#ariaid-title4}

Specifies the number of seconds to wait before performing an auto refresh of the data on
the timeline. Setting the number of seconds to 0 will
turn auto refresh off. By default, auto refresh is disabled. If intSeconds
is greater than 0 and less than the minimum allowed time in seconds (10), it will be set to 10
seconds.
Setting the number of seconds to 0 will turn auto refresh off. By default, auto refresh is disabled.
If intSeconds is greater than 0 and less than the minimum allowed time in seconds (10), it will be set to 10 seconds.
{#r_GTL-setAutoRefresh_N__table_zjn_5ct_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| intSeconds | Number | An integer specifying the time in seconds between auto-refreshing. |
[Table 5. Parameters]

{#r_GTL-setAutoRefresh_N__table_zjn_5ct_5t} {#r_GTL-setAutoRefresh_N__table_akn_5ct_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 6. Returns]

{#r_GTL-setAutoRefresh_N__table_akn_5ct_5t}  

    glideTimeline.setAutoRefresh(15); // Sets the interval for auto-refreshing to 15 seconds.

## GlideTimeline - setDefaultPointIconClass(String icon_class) {#ariaid-title5}

Specifies the default icon class to use for Timeline Spans with
zero duration if no icon class was explicitly specified in the properties of the
Timeline Span returned from the server.
The default value for the setDefaultPointIconClass property is
milestone.
The default value for the setDefaultPointIconClass property is
milestone.
{#r_GTL-setDefaultPointIconClass_S__table_c2p_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| icon_class | String | String that specifies one of the following values: * `milestone` * `blue_square ` * `sepia_square ` * `green_square` * `red_square ` * `black_square` * `blue_circle` * `sepia_circle ` * `green_circle` * `red_circle` * ` black_circle ` {#r_GTL-setDefaultPointIconClass_S__ul_hmt_fgn_xt} |
[Table 7. Parameters]

{#r_GTL-setDefaultPointIconClass_S__table_c2p_mns_5t} {#r_GTL-setDefaultPointIconClass_S__table_d2p_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 8. Returns]

{#r_GTL-setDefaultPointIconClass_S__table_d2p_mns_5t}  

    glideTimeline.setDefaultPointIconClass('blue_circle');

## GlideTimeline - setExtraAjaxParam(String strName, String strValue) {#ariaid-title6}

Allows setting of additional parameters in the client script to be made available to the
corresponding Script Include events by using the getParameter()
method.
URI parameters that are prefixed with `sysparm_timeline_` will automatically be
included in all server side AJAX calls.
URI parameters that are prefixed with `sysparm_timeline_` will automatically be
included in all server side AJAX calls.
{#r_GTL-setExtraAjaxParam_S_S__table_mpw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| strName | String | The URI parameter name. |
| strValue | String | The value of strName. |
[Table 9. Parameters]

{#r_GTL-setExtraAjaxParam_S_S__table_mpw_v4s_5t} {#r_GTL-setExtraAjaxParam_S_S__table_npw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 10. Returns]

{#r_GTL-setExtraAjaxParam_S_S__table_npw_v4s_5t}  

    glideTimeline.setExtraAjaxParam("sysparm_timeline_limit", "5");

## GlideTimeline - setInitialViewRange(String objStartDate, String objEndDate) {#ariaid-title7}

Specifies the initial viewable range for the timeline.
The format of the start and end dates must be in the default timestamp format: yyyy-MM-dd
HH:mm:ss. The default range is the range that specifies the earliest Timeline Span point to
the end of the latest Timeline Span. If the initialViewRange property
is specified, it will override the default range.
The format of the start and end dates must be in the default timestamp format: yyyy-MM-dd
HH:mm:ss. The default range is the range that specifies the earliest Timeline Span point to
the end of the latest Timeline Span. If the initialViewRange property
is specified, it will override the default range.
{#r_GTL-setInitialViewRange_S_S__table_epw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| objStartDate | String | The start time of the view range in format: yyyy-MM-dd HH:mm:ss . |
| objEndDate | String | The end time of the view range in format: yyyy-MM-dd HH:mm:ss . |
[Table 11. Parameters]

{#r_GTL-setInitialViewRange_S_S__table_epw_v4s_5t} {#r_GTL-setInitialViewRange_S_S__table_fpw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 12. Returns]

{#r_GTL-setInitialViewRange_S_S__table_fpw_v4s_5t}  

    // Sets the initial range to begin on June 20th, 2010 at 8:00 AM and end on June 28th, 2010 at 2:00 PM UTC time.
          glideTimeline.setInitialViewRange("2010-06-20 08:00:00", "2010-06-28 14:00:00");
        
## GlideTimeline - setInitialViewRange(Number objStartDate, Number objEndDate) {#ariaid-title8}

Specifies the initial viewable range for the timeline.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
{#r_GTL-setInitialViewRange_N_N__table_gpw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| objStartDate | Number | The start time of the view range in milliseconds. |
| objEndDate | Number | The end time in milliseconds. |
[Table 13. Parameters]

{#r_GTL-setInitialViewRange_N_N__table_gpw_v4s_5t} {#r_GTL-setInitialViewRange_N_N__table_hpw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 14. Returns]

{#r_GTL-setInitialViewRange_N_N__table_hpw_v4s_5t}  

    // Sets the initial range to begin on June 20th, 2010 at 8:00 AM and end on June 28th, 2010 at 2:00 PM UTC time.
          glideTimeline.setInitialViewRange(1277046000000, 1277647200000);

## GlideTimeline - setInitialViewRange(String objStartDate, Number objEndDate) {#ariaid-title9}

Specifies the initial viewable range for the timeline.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
{#r_GTL-setInitialViewRange_S_N__table_ipw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| objStartDate | String | The start time of the view range in format: yyyy-MM-dd HH:mm:ss . |
| objEndDate | Number | The end time in milliseconds. |
[Table 15. Parameters]

{#r_GTL-setInitialViewRange_S_N__table_ipw_v4s_5t} {#r_GTL-setInitialViewRange_S_N__table_jpw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 16. Returns]

{#r_GTL-setInitialViewRange_S_N__table_jpw_v4s_5t}  
ExampleExplanation

    // Sets the initial range to begin on June 20th, 2010 at 8:00 AM and end on June 28th, 2010 at 2:00 PM UTC time.
          glideTimeline.setInitialViewRange("2010-06-20 08:00:00", 1277647200000);

## GlideTimeline - setInitialViewRange(Number objStartDate, String objEndDate) {#ariaid-title10}

Specifies the initial viewable range for the timeline.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
The default range is the range that specifies the earliest Timeline Span point to the end of the
latest Timeline Span. If the initialViewRange property is specified, it
will override the default range.
{#r_GTL-setInitialViewRange_N_S__table_kpw_v4s_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| objStartDate | Number | The start time of the view range in milliseconds. |
| objEndDate | String | The end time of the view range in format: yyyy-MM-dd HH:mm:ss . |
[Table 17. Parameters]

{#r_GTL-setInitialViewRange_N_S__table_kpw_v4s_5t} {#r_GTL-setInitialViewRange_N_S__table_lpw_v4s_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 18. Returns]

{#r_GTL-setInitialViewRange_N_S__table_lpw_v4s_5t}  
ExampleExplanation

    // Sets the initial range to begin on June 20th, 2010 at 8:00 AM and end on June 28th, 2010 at 2:00 PM UTC time.
          glideTimeline.setInitialViewRange(1277046000000, "2010-06-28 14:00:00");

## GlideTimeline - setReadOnly(Boolean b) {#ariaid-title11}

Enables or disables all timeline event interaction.
If enabled, event interaction is determined from the corresponding attributes specified by each
Timeline Item. The default value for the readOnly
property is false.
If enabled, event interaction is determined from the corresponding attributes specified by each
Timeline Item. The default value for the readOnly
property is false.
{#r_GTL-setReadOnly_B__table_zmm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, marks the entire timeline as read-only (non-interactive). |
[Table 19. Parameters]

{#r_GTL-setReadOnly_B__table_zmm_gfs_5t} {#r_GTL-setReadOnly_B__table_anm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 20. Returns]

{#r_GTL-setReadOnly_B__table_anm_gfs_5t}  

    glideTimeline.setReadOnly(true);

## GlideTimeline - showDependencyLines(Boolean b) {#ariaid-title12}

Specifies whether or not to show dependency lines between Timeline Spans.
This method applies only if the set of Timeline Items returned from the server includes
dependency relationships. The default value for the showDependencyLines property is
false.
This method applies only if the set of Timeline Items returned from the server includes
dependency relationships. The default value for the showDependencyLines property is
false.
{#r_GTL-showDependencyLines_B__table_jnm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, displays dependency lines on the timeline; otherwise, does not. |
[Table 21. Parameters]

{#r_GTL-showDependencyLines_B__table_jnm_gfs_5t} {#r_GTL-showDependencyLines_B__table_knm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 22. Returns]

{#r_GTL-showDependencyLines_B__table_knm_gfs_5t}  

    glideTimeline.showDependencyLines(true);

## GlideTimeline - showGridLines(Boolean bShowGridlines, Number amount) {#ariaid-title13}

Specifies whether or not to show grid lines for each row of data on the timeline.
By default, grid lines are enabled.
By default, grid lines are enabled.
{#r_GTL-showGridLines_B_N__table_xjn_5ct_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| bShowGridlines | Boolean | If true, timeline shows grid lines; otherwise, does not display grid lines. |
| amount | Number | amount |
[Table 23. Parameters]

{#r_GTL-showGridLines_B_N__table_xjn_5ct_5t} {#r_GTL-showGridLines_B_N__table_yjn_5ct_5t__entry__2}

| Type | Description |
|-|-|
| void | ReturnValue |
[Table 24. Returns]

{#r_GTL-showGridLines_B_N__table_yjn_5ct_5t}  

    glideTimeline.showGridLines(false); // Disables grid lines.

## GlideTimeline - showLeftPane(Boolean b) {#ariaid-title14}

Specifies whether or not to show the left hand pane in the timeline.
The default value for the leftPane property is
true.
The default value for the leftPane property is
true.
{#r_GTL-showLeftPane_B__table_bnm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, the timeline shows the left pane; otherwise, the left pane is not be displayed. |
[Table 25. Parameters]

{#r_GTL-showLeftPane_B__table_bnm_gfs_5t} {#r_GTL-showLeftPane_B__table_cnm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 26. Returns]

{#r_GTL-showLeftPane_B__table_cnm_gfs_5t}  

    glideTimeline.showLeftPane(false);

## GlideTimeline - showLeftPaneAsTree(Boolean b) {#ariaid-title15}

Specifies how to show child items in the left pane of the timeline. Child items
are displayed either as nested, indented nodes with expand and collapse capability or on a single indent level.
The default value for the showLeftPaneAsTree property is
false.
The default value for the showLeftPaneAsTree property is
false.
{#r_GTL-showLeftPaneAsTree_B__table_fnm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, child item nodes are shown as indented with expand/collapse capability; otherwise, all left pane items are displayed at a single indent level. |
[Table 27. Parameters]

{#r_GTL-showLeftPaneAsTree_B__table_fnm_gfs_5t} {#r_GTL-showLeftPaneAsTree_B__table_gnm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 28. Returns]

{#r_GTL-showLeftPaneAsTree_B__table_gnm_gfs_5t}  

    glideTimeline.showLeftPaneAsTree(true);

## GlideTimeline - showLeftPaneInputBox(Boolean b, String strDefaultValue) {#ariaid-title16}

Specifies whether or not to show the text input box at the bottom of the left pane with a
default value as specified by strDefaultValue.
If the left pane is diabled via showLeftPane(), the input box will not be
visible. The default value for the showLeftPaneInputBox property is
false.
If the left pane is diabled via showLeftPane(), the input box will not be
visible. The default value for the showLeftPaneInputBox property is
false.
{#r_GTL-showLeftPaneInputBox_B_S__table_e2p_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, show the left pane input box. |
| strDefaultValue | String | The default value to display in the input box. |
[Table 29. Parameters]

{#r_GTL-showLeftPaneInputBox_B_S__table_e2p_mns_5t} {#r_GTL-showLeftPaneInputBox_B_S__table_f2p_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 30. Returns]

{#r_GTL-showLeftPaneInputBox_B_S__table_f2p_mns_5t}  

    glideTimeline.showLeftPaneInputBox(true, 'Add a new task ...');
        
## GlideTimeline - showSummaryPane(Boolean b) {#ariaid-title17}

Specifies whether or not to show the summary pane at the bottom of the timeline.
The default value for the showSummaryPane property is true.
The default value for the showSummaryPane property is true.
{#r_GTL-showSummaryPane_B__table_dnm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, the timeline includes the summary pane; otherwise, the summary pane is not displayed. |
[Table 31. Parameters]

{#r_GTL-showSummaryPane_B__table_dnm_gfs_5t} {#r_GTL-showSummaryPane_B__table_enm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 32. Returns]

{#r_GTL-showSummaryPane_B__table_enm_gfs_5t}  

    glideTimeline.showSummaryPane(false);

## GlideTimeline - showTimelineText(Boolean b) {#ariaid-title18}

Specifies whether or not to show the timeline text underneath each Timeline Span in the primary timeline pane.
The default value for the showTimelineText property is false.
The default value for the showTimelineText property is false.
{#r_GTL-showTimelineText_B__table_hnm_gfs_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, displays descriptive text underneath each Timeline Span; otherwise, no text is displayed underneath each Timeline Span. |
[Table 33. Parameters]

{#r_GTL-showTimelineText_B__table_hnm_gfs_5t} {#r_GTL-showTimelineText_B__table_inm_gfs_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 34. Returns]

{#r_GTL-showTimelineText_B__table_inm_gfs_5t}  

    glideTimeline.showTimelineText(true);

## GlideTimeline - snapVertScrollingIntoRows(Boolean b) {#ariaid-title19}

Specifies whether or not the vertical
movement of timeline span objects (if appropriately registered to perform this event)
should snap adjust into the closest row.
By default this value is enabled.
By default this value is enabled.
{#r_GTL-snapVertScrollingIntoRows_B__table_vjn_5ct_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, snaps vertical movement of timeline span objects into rows; otherwise, items move exactly with respect to the mouse. |
[Table 35. Parameters]

{#r_GTL-snapVertScrollingIntoRows_B__table_vjn_5ct_5t} {#r_GTL-snapVertScrollingIntoRows_B__table_wjn_5ct_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 36. Returns]

{#r_GTL-snapVertScrollingIntoRows_B__table_wjn_5ct_5t}  

    glideTimeline.snapVertScrollingIntoRows(false);

## GlideTimeline - sortByLeftLabelText(Boolean b) {#ariaid-title20}

Specifies whether or not to group items by their left label text.
The default value for the sortByLeftLabelText property is
false.
The default value for the sortByLeftLabelText property is
false.
{#r_GTL-sortByLeftLabelText_B__table_wdp_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, sort Timeline Items alphabetically by the text specified in each item's left label. |
[Table 37. Parameters]

{#r_GTL-sortByLeftLabelText_B__table_wdp_mns_5t} {#r_GTL-sortByLeftLabelText_B__table_xdp_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 38. Returns]

{#r_GTL-sortByLeftLabelText_B__table_xdp_mns_5t}  

    glideTimeline.sortByLeftLabelText(true);

## GlideTimeline - sortByStartDate(Boolean b) {#ariaid-title21}

Specifies whether or not to sort the list of Timeline Items returned by the earliest start date of an item's
Timeline Span objects. If groupByParent() is set true, items are sorted after
grouping has occurred. The default value for the sortByStartDate
property is false.
If groupByParent() is set true, items are sorted after
grouping has occurred. The default value for the sortByStartDate
property is false.
{#r_GTL-sortByStartDate_B__table_a2p_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, sort Timeline Items chronologically starting with their earliest start date. |
[Table 39. Parameters]

{#r_GTL-sortByStartDate_B__table_a2p_mns_5t} {#r_GTL-sortByStartDate_B__table_b2p_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 40. Returns]

{#r_GTL-sortByStartDate_B__table_b2p_mns_5t}  

    glideTimeline.sortByStartDate(true);

## GlideTimeline - sortByTimelineLabelText(Boolean b) {#ariaid-title22}

Specifies whether or not to sort the list of Timeline Items returned in alphabetical order
according to the text that was specified to show in the Timeline Pane.
Note:  
This sort order still applies even if the timeline text has been set false via the showTimelineText() method. Additionally, if groupByParent() is set true, items will be sorted appropriately after grouping has occurred.

The default value for the sortByTimelineLabelText property is
false.
{#r_GTL-sortByTimelineLabelText_B_N__table_ydp_mns_5t__entry__3}

| Name | Type | Description |
|-|-|-|
| b | Boolean | If true, sorts Timeline Items alphabetically by the text specified in each item's timeline span text. |
[Table 41. Parameters]

{#r_GTL-sortByTimelineLabelText_B_N__table_ydp_mns_5t} {#r_GTL-sortByTimelineLabelText_B_N__table_zdp_mns_5t__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 42. Returns]

{#r_GTL-sortByTimelineLabelText_B_N__table_zdp_mns_5t}  

    glideTimeline.sortByTimelineLabelText(true);


