Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WSPlat and version Alps_SP1
Scroll ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
#72B0DE#72B0DEGeneral


Concepts

AdministratorsBasicUsers

InfrastructureTheme Configuration

SSO Configuration

Form Builder

Common Masters

Widgets

Export/Import

Currency

Workflow

Customers

Vendors

AdvancedDiscovery and Monitoring

Documents

Notifications

Compliance

Productivity

Shift Management

Escalations

License

GDPR

Password Management

Reports and Dashboards

trueOthers

What is Scripting?

Using the SCRIPTING icon Image Removed Image Addedon the Quick Action Bar, the Administrators can now write their own Java Script, CSS, and HTML codes to customize the fields present on all the pages.
SCRIPTING icon on Quick Action BarImage Removed
image2019-5-30_11-33-26.pngImage Added
Figure: SCRIPTING icon on Quick Action Bar

Note
titleNote:

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

SCRIPTING - PAGE NAME (TENANT) pageImage RemovedSCRIPTING - PAGE NAME (TENANT) pageImage Added
Figure: SCRIPTING - PAGE NAME (TENANT) page

When you click on the SCRIPTING icon Scripting IconImage Removed Scripting IconImage Added present on the Quick Action Bar, you are redirected to the SCRIPTING - PAGE NAME (TENANT) page where you can write your own Java ScriptCSS, and HTML 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.

Expand
titleSee Screen Shot

CONTROL drop-down listImage RemovedCONTROL drop-down listImage Added
Figure: CONTROL drop-down list

PROPERTIES

Below the drop-down list are two tabs: PROPERTIES and EVENTS.

Expand
titleSee Screen Shot

Image RemovedImage Added
Figure: SCRIPTING - PAGE NAME (TENANT) page: PROPERTIES and EVENTS tabs

Under the PROPERTIES tab there are two fields:

  • Control ID - The Control ID is the ID of the control selected from the CONTROL drop-down list.
  • Associated Control ID - The Associated Control ID is the ID of the secondary controls associated with the primary control. For example, in the Description field of the NEW INCIDENT page, the Description field is the primary control and the text area associated with the Description field is the associated control.

    Expand
    titleSee Screen Shot

    Image RemovedImage Added
    Figure: PROPERTIES tab: Control ID and Associated Control ID

EVENTS

Under the EVENTS tab, you can write the Java Script for the Events of the selected Control.

Expand
titleSee Screen Shot

 EVENTS tabImage Removed EVENTS tabImage Added
Figure: EVENTS tab

DESCRIPTION

Double-click on the fields present in the PROPERTIES and EVENTS tabs to view the description under the DESCRIPTION section.

Expand
titleSee Screen Shot

DESCRIPTIONImage RemovedDESCRIPTIONImage Added
Figure: DESCRIPTION

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.

Expand
titleSee Screen Shot

JS tabImage RemovedJS tabImage Added
Figure: JS tab

Note
titleNote:
  • The data specified between the hash tags (#), for example, #url#, are called user inputs, in which the sensitive information is passed. Any sensitive information that is passed to the API is mentioned inside the user inputs (#).
  • When you click SUBMIT,andif the script contains data within the user inputs(#), a popup containing fields, for which inputs are required from the user, is displayed. So, the user needs to provide the values and click SUBMIT.

CSS

You can add or write your own CSS codes, under the text area provided below the CSS section.

Expand
titleSee Screen Shot

CSS tabImage RemovedCSS tabImage Added
Figure: CSS tab

HTML

You can add or write your own HTML codes, under the text area provided below the HTML section.

Expand
titleSee Screen Shot

Image Added
Figure: HTML tab

Note
titleNote:

By default, HTML Codes with  dynamic id (dscript_htmldiv_01) will not be displayed on the page. The user must write the JS for appending the HTML then only HTML block will be displayed on the page.

The unique dynamic id (dscript_htmldiv_01) should not be used by the admin while writing HTML Codes. Refer Quick Help to see examples of how to refer dynamic id (dscript_htmldiv_01) in JS.

Status
  • Maintenance: If selected, the customized changes on the page are applicable to user who has done the scripting and not applicable to the other users without access. Click Image RemovedImage Addedicon , to provide user and location wise access. See the screenshot below:


    ACCESS pop-up windowImage RemovedACCESS pop-up windowImage Added
    Figure: ACCESS pop-up window

    FieldDescription
    Access To Me

    Select this check box to have self access to the customized field changes.

    Note: By default will be checked.

    LocationSelect the location name using auto-complete search option.
    Search User

    Search and Select the users using Type in search box.

    Selected UsersDisplays selected user list.
  • Published: If selected, the customized field changes are available to all users.

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.

Expand
titleSee Screen Shot

Version drop-down listImage RemovedVersion drop-down listImage Added
Figure: Version drop-down list

Quick Help iconImage RemovedQuick Help iconImage Added Quick Help icon

The Quick Help icon Quick Help iconImage Removed Quick Help iconImage Added 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.


Expand
titleUse Case

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:

  1. Click Incident > User > New Incident. The NEW INCIDENT page is displayed.
    NEW INCIDENT pageImage Removed
    Image Added
    Figure: NEW INCIDENT page

  2. On the NEW INCIDENT page, select a preferred Tenant.
    Image Removed
    Image Added
    Figure: NEW INCIDENT page: Tenant Selection

  3. Click SCRIPTING icon Scripting IconImage Removed on Image Added on the Quick Action Bar, You are redirected to the SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page.
    SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) pageImage Removed
    SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) pageImage Added
    Figure: SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page

  4. On the SCRIPTING - NEW INCIDENT (INFORMATION TECHNOLOGY) page, under the CONTROL drop-down list, select Description.
  5. You can now see the Control ID and Associated Control ID of the Description field in the PROPERTIES tab.
  6. 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.

    PROPERTIES tabImage RemovedPROPERTIES tabImage Added
    Figure: PROPERTIES tab

    Note
    titleNote:

    If you want to configure events for the Description field you can click on the Events tab and select the preferred events.

  7. In the text area provided under the JS (Java Script) tab, write or add your Java Script.
  8. Select the Active check box, if the Active check box is not already selected.
  9. Click SUBMIT.
  10. Now, navigate to the NEW INCIDENT page and check whether the changes are applied and visible on the NEW INCIDENT page.
  11. You have successfully changed the name of the Description field present on the NEW INCIDENT page.
Scroll ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
1

| |