{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1041,"path":"api-reference/server-api-reference/c_GlideTimelineAPI.md","title":null,"bundle":null,"doc_type":null,"release":null,"body":"---\ntitle: GlideTimeline - Global\ndescription: The GlideTimeline API provides the core implementation for configuring and displaying a Glide Windowing Toolkit Timeline.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.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.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.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.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.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.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.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.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.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.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.Specifies whether or not to show grid lines for each row of data on the timeline. By default, grid lines are enabled.Specifies whether or not to show the left hand pane in the timeline. The default value for the leftPane property is true.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.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.Specifies whether or not to show the summary pane at the bottom of the timeline. The default value for the showSummaryPane property is true.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.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.Specifies whether or not to group items by their left label text. The default value for the sortByLeftLabelText property is false.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.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.\nlocale: en-US\ncanonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/c\\_GlideTimelineAPI.html\nrelease: australia\nproduct: Server API Reference\nclassification: server-api-reference\ntopic_type: concept\nlast_updated: \"2026-03-12\"\nreading_time_minutes: 11\nbreadcrumb: [Server API reference, API reference, API implementation and reference]\n---\n\n# GlideTimeline- Global\n\nThe GlideTimeline API provides the core implementation for configuring and displaying a Glide Windowing Toolkit Timeline.\n\nFor security, the GlideTimeline has already been instantiated as a single instance variable called *GlideTimeline*. All configurations should be made in the client script section of the corresponding schedule page that references this instance variable.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## GlideTimeline - groupByParent\\(Boolean b\\)\n\nSpecifies 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**.\n\nIf **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**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, displays Timeline Items grouped by parent.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.groupByParent(true);\n```\n\n## GlideTimeline - registerEvent\\(String strServerEvent, String strScriptIncludeName\\)\n\nRegisters 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.\n\nThe 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.\n\n<table id=\"table_opw_v4s_5t\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstrServerEvent\n\n</td><td>\n\nString\n\n</td><td>\n\nSpecifies one of the following case-sensitive events: -   **getItems**\n-   **elementMoveX**\n-   **elementMoveY**\n-   **elementMoveXY**\n-   **elementSuccessor**\n-   **elementTimeAdjustStart**\n-   **elementTimeAdjustEnd**\n-   **inputBox**\n-   **itemMove**\n\n</td></tr><tr><td>\n\nstrScriptIncludeName\n\n</td><td>\n\nString\n\n</td><td>\n\nSpecifies the name of the class to receive the **strServerEvent**. This class must be defined in a script include that extends AbstractTimelineSchedulePage.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.registerEvent(\"getItems\", \"TimelineGanttSchedulePage\");\n```\n\n## GlideTimeline - setAutoRefresh\\(Number intSeconds\\)\n\nSpecifies 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.\n\nSetting 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|intSeconds|Number|An integer specifying the time in seconds between auto-refreshing.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.setAutoRefresh(15); // Sets the interval for auto-refreshing to 15 seconds.\n```\n\n## GlideTimeline - setDefaultPointIconClass\\(String icon\\_class\\)\n\nSpecifies 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**.\n\nThe default value for the setDefaultPointIconClass property is **milestone**.\n\n<table id=\"table_c2p_mns_5t\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nicon\\_class\n\n</td><td>\n\nString\n\n</td><td>\n\nString that specifies one of the following values: -   `milestone`\n-   `blue_square`\n-   `sepia_square`\n-   `green_square`\n-   `red_square`\n-   `black_square`\n-   `blue_circle`\n-   `sepia_circle`\n-   `green_circle`\n-   `red_circle`\n-   `black_circle`\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.setDefaultPointIconClass('blue_circle');\n```\n\n## GlideTimeline - setExtraAjaxParam\\(String strName, String strValue\\)\n\nAllows 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.\n\nURI parameters that are prefixed with `sysparm_timeline_` will automatically be included in all server side AJAX calls.\n\n|Name|Type|Description|\n|----|----|-----------|\n|strName|String|The URI parameter name.|\n|strValue|String|The value of strName.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.setExtraAjaxParam(\"sysparm_timeline_limit\", \"5\");\n```\n\n## GlideTimeline - setInitialViewRange\\(String objStartDate, String objEndDate\\)\n\nSpecifies 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.\n\nThe 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|objStartDate|String|The start time of the view range in format: yyyy-MM-dd HH:mm:ss .|\n|objEndDate|String|The end time of the view range in format: yyyy-MM-dd HH:mm:ss .|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\n// 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.\n      glideTimeline.setInitialViewRange(\"2010-06-20 08:00:00\", \"2010-06-28 14:00:00\");\n    \n```\n\n## GlideTimeline - setInitialViewRange\\(Number objStartDate, Number objEndDate\\)\n\nSpecifies 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.\n\nThe 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|objStartDate|Number|The start time of the view range in milliseconds.|\n|objEndDate|Number|The end time in milliseconds.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\n// 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.\n      glideTimeline.setInitialViewRange(1277046000000, 1277647200000);\n```\n\n## GlideTimeline - setInitialViewRange\\(String objStartDate, Number objEndDate\\)\n\nSpecifies 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.\n\nThe 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|objStartDate|String|The start time of the view range in format: yyyy-MM-dd HH:mm:ss .|\n|objEndDate|Number|The end time in milliseconds.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\nExampleExplanation\n\n```\n// 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.\n      glideTimeline.setInitialViewRange(\"2010-06-20 08:00:00\", 1277647200000);\n```\n\n## GlideTimeline - setInitialViewRange\\(Number objStartDate, String objEndDate\\)\n\nSpecifies 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.\n\nThe 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.\n\n|Name|Type|Description|\n|----|----|-----------|\n|objStartDate|Number|The start time of the view range in milliseconds.|\n|objEndDate|String|The end time of the view range in format: yyyy-MM-dd HH:mm:ss .|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\nExampleExplanation\n\n```\n// 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.\n      glideTimeline.setInitialViewRange(1277046000000, \"2010-06-28 14:00:00\");\n```\n\n## GlideTimeline - setReadOnly\\(Boolean b\\)\n\nEnables 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**.\n\nIf enabled, event interaction is determined from the corresponding attributes specified by each Timeline Item. The default value for the **readOnly** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, marks the entire timeline as **read-only** \\(non-interactive\\).|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.setReadOnly(true);\n```\n\n## GlideTimeline - showDependencyLines\\(Boolean b\\)\n\nSpecifies 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**.\n\nThis 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**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, displays dependency lines on the timeline; otherwise, does not.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showDependencyLines(true);\n```\n\n## GlideTimeline - showGridLines\\(Boolean bShowGridlines, Number amount\\)\n\nSpecifies whether or not to show grid lines for each row of data on the timeline. By default, grid lines are enabled.\n\nBy default, grid lines are enabled.\n\n|Name|Type|Description|\n|----|----|-----------|\n|bShowGridlines|Boolean|If **true**, timeline shows grid lines; otherwise, does not display grid lines.|\n|amount|Number|amount|\n\n|Type|Description|\n|----|-----------|\n|void|ReturnValue|\n\n```\nglideTimeline.showGridLines(false); // Disables grid lines.\n```\n\n## GlideTimeline - showLeftPane\\(Boolean b\\)\n\nSpecifies whether or not to show the left hand pane in the timeline. The default value for the **leftPane** property is **true**.\n\nThe default value for the **leftPane** property is **true**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, the timeline shows the left pane; otherwise, the left pane is not be displayed.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showLeftPane(false);\n```\n\n## GlideTimeline - showLeftPaneAsTree\\(Boolean b\\)\n\nSpecifies 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**.\n\nThe default value for the **showLeftPaneAsTree** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|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.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showLeftPaneAsTree(true);\n```\n\n## GlideTimeline - showLeftPaneInputBox\\(Boolean b, String strDefaultValue\\)\n\nSpecifies 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**.\n\nIf the left pane is diabled via showLeftPane\\(\\), the input box will not be visible. The default value for the **showLeftPaneInputBox** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, show the left pane input box.|\n|strDefaultValue|String|The default value to display in the input box.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showLeftPaneInputBox(true, 'Add a new task ...');\n    \n```\n\n## GlideTimeline - showSummaryPane\\(Boolean b\\)\n\nSpecifies whether or not to show the summary pane at the bottom of the timeline. The default value for the showSummaryPane property is **true**.\n\nThe default value for the showSummaryPane property is **true**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, the timeline includes the summary pane; otherwise, the summary pane is not displayed.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showSummaryPane(false);\n```\n\n## GlideTimeline - showTimelineText\\(Boolean b\\)\n\nSpecifies 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**.\n\nThe default value for the showTimelineText property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, displays descriptive text underneath each Timeline Span; otherwise, no text is displayed underneath each Timeline Span.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.showTimelineText(true);\n```\n\n## GlideTimeline - snapVertScrollingIntoRows\\(Boolean b\\)\n\nSpecifies 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.\n\nBy default this value is enabled.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, snaps vertical movement of timeline span objects into rows; otherwise, items move exactly with respect to the mouse.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.snapVertScrollingIntoRows(false);\n```\n\n## GlideTimeline - sortByLeftLabelText\\(Boolean b\\)\n\nSpecifies whether or not to group items by their left label text. The default value for the **sortByLeftLabelText** property is **false**.\n\nThe default value for the **sortByLeftLabelText** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, sort Timeline Items alphabetically by the text specified in each item's left label.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.sortByLeftLabelText(true);\n```\n\n## GlideTimeline - sortByStartDate\\(Boolean b\\)\n\nSpecifies 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**.\n\nIf groupByParent\\(\\) is set **true**, items are sorted after grouping has occurred. The default value for the **sortByStartDate** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If **true**, sort Timeline Items chronologically starting with their earliest start date.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.sortByStartDate(true);\n```\n\n## GlideTimeline - sortByTimelineLabelText\\(Boolean b\\)\n\nSpecifies 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.\n\n**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.\n\nThe default value for the **sortByTimelineLabelText** property is **false**.\n\n|Name|Type|Description|\n|----|----|-----------|\n|b|Boolean|If true, sorts Timeline Items alphabetically by the text specified in each item's timeline span text.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nglideTimeline.sortByTimelineLabelText(true);\n```\n\n"}}