- Created by Chilukuri Srinivasa Reddy, last modified by Shilpa K on Apr 22, 2024
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 4 Current »
What is the Scripting?
With the Scripting functionality in the SummitAI application, Administrators can now write their own Java Script and CSS codes to customize the fields present on the pages consisting of the SCRIPTING icon on their respective ACTIONS panel.
Note:
To enable the SCRIPTING functionality in the SummitAI application, you should enable the Enable Scripting check box, which is present under the SCRIPTING section, on the ROLE TEMPLATE - OTHER CONFIGURATION page.
SCRIPTING - PAGE NAME (TENANT) page
Figure: SCRIPTING - PAGE NAME (TENANT) page
When you click on the SCRIPTING icon present on the ACTIONS panel, you are redirected to the SCRIPTING - PAGE NAME (TENANT) page where you can write your own Java Script and CSS codes to customize the fields present on the page. For more information about the fields present on the SCRIPTING - PAGE NAME (TENANT) page, see the Field Description table given below:
Field Description
The fields present on the SCRIPTING - PAGE NAME (TENANT) page are explained in the table given below:
Field | Description |
---|---|
CONTROL | |
Drop-down list | Under the CONTROL section, a drop-down list, consisting of controls (having IDs and text) that can be customized, are present. Select a preferred Control, for which you want to write the scripts for, from the drop-down list. See Screen Shot
|
PROPERTIES | Below the drop-down list are two tabs: PROPERTIES and EVENTS. See Screen Shot
Under the PROPERTIES tab there are two fields:
|
EVENTS | Under the EVENTS tab, you can write the Java Script for the Events of the selected Control. See Screen Shot
|
DESCRIPTION | Double-click on the fields present in the PROPERTIES and EVENTS tabs to view the description under the DESCRIPTION section. See Screen Shot
|
Active | If this check box is selected, the current scripting becomes active for the selected Tenant and is applied to the page. |
AREA FOR ADDING SCRIPTS | |
JS | You can add or write your own Java Script (JS) codes, under the text area provided below the JS section. See Screen Shot
Note:
|
CSS | You can add or write your own CSS codes, under the text area provided below the CSS section. See Screen Shot
|
Version | Each time you make customizations on the selected page and submit the changes, it is saved as a different version in the SummitAI application. You can select a preferred version based on your requirement from the Version drop-down list and click OK. You can modify an already existing version, and then save it as a new version. See Screen Shot
|
Quick Help icon | The Quick Help icon displays information related to the actions that can be performed on the SCRIPTING page. For example, if you want to perform the following action: How to invoke Web Service? The CODE SNIPPET is provided in the QUICK HELP pop-up. |
An example to explain the use of the Scripting functionality is given below:
Scenario
Consider that you want to write a Java Script (JS) to change the name of the Description field present on the NEW INCIDENT page.
Steps
To write a Java Script (JS) to change the name of the Description field present on the NEW INCIDENT page, perform the steps given below:
- Click Incident > User > New Incident. The NEW INCIDENT page is displayed.
Figure: NEW INCIDENT page - On the NEW INCIDENT page, select a preferred Tenant.
Figure: NEW INCIDENT page: Tenant Selection - On the ACTIONS panel of the NEW INCIDENT page, click SCRIPTING. You are redirected to the SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page.
Figure: SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page - On the SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page, under the CONTROL drop-down list, select Description.
- You can now see the Control ID and Associated Control ID of the Description field in the PROPERTIES tab.
Under the PROPERTIES tab, in the text area of the Label Text field, edit the name of the Description field. In this example, the field name is changed from Description to Details_Test.
Figure: PROPERTIES tabNote:
If you want to configure events for the Description field you can click on the Events tab and select the preferred events.
- In the text area provided under the JS (Java Script) tab, write or add your Java Script.
- Select the Active check box, if the Active check box is not already selected.
- Click SUBMIT.
- Now, navigate to the NEW INCIDENT page and check whether the changes are applied and visible on the NEW INCIDENT page.
- You have successfully changed the name of the Description field present on the NEW INCIDENT page.
- No labels