User Manual

08.14.2024

MANUAL

Developer Function: Script

## Overview To enable UI operations that cannot be achieved with standard functions via Ajax POST requests, you can set JavaScript that can be applied to each site. Below is how to add it and a list of currently available APIs. ## How To Add A Script (This operation requires "Site Administration Permission.") 1. Open the target table. 1. Click "「Table Management」" from the "Management" menu. 1. Open the "[Script](/en/manual/table-management-script)" tab. 1. Click the "Create New" button. 1. Enter/set the items in the table below. 1. Click the "Add" button. 1. Click the "Update" button at the bottom of the screen. |Item name|Description|Setting method| |:---|:---|:---| |Title|Script title|Enter any title| |Script|Script content|Enter any script| |Output destination|Select the output screen|Set with checkboxes| ## List Of Script Functions ### Site information acquisition script (SiteInfo.js) |No|Function name|Description| |:--:|:---|:---| |1|[$p.tableName]()|Function to get table type. | |2|[$p.controller]()|Function to get controller type. | |3|[$p.action]()|Function to get action type. | ### Site Information Update Script (_Data.js) |No|Function name|Description| |:--:|:---|:---| |1|[$p.set](/manual/script-set)|This function changes the value on the screen and stores it in $p.data at the same time. | ### Site Message Script (Message.js) |No|Function name|Description| |:--:|:---|:---| |1|[$p.clearMessage](/manual/script-clear-message)|This function deletes the message displayed at the bottom of the screen. | |2|[$p.setMessage](/manual/script-set-message)|This function displays a message at the bottom of the screen. | ### Scripts for command operations and user/organization/group operations (_Api.js) |No|Function name|Description| |:--:|:---|:---| |1|[$p.apiUrl](/manual/script-api-url)|A function that retrieves the URL value of the API request. | |2|[$p.apiGet](/manual/script-api-get)|A function that retrieves values. | |3|[$p.apiCreate](/manual/script-api-create)|A function that creates new records. | |4|[$p.apiUpdate](/manual/script-api-update)|A function that updates records. | |5|[$p.apiDelete](/manual/script-api-delete)|A function that deletes sites and records. | |6|[$p.apiBulkDelete](/manual/script-api-delete)|A function that deletes sites and records in bulk. | |7|[$p.apiUsesGet](/manual/script-api-users-get)|A function to retrieve user information. | |8|[$p.apiUsesUpdate](/manual/script-api-users-update)|A function to update user information. | |9|[$p.apiUsesDelete](/manual/script-api-users-delete)|A function to delete user information. | |10|[$p.apiDeptsUrl]()|A function to retrieve the URL for executing the API for any organization on the site. | |11|[$p.apiDeptsGet]()|A function to retrieve organization information. | |12|[$p.apiGroupsUrl]()|A function to retrieve the URL for executing the API for any group on the site. | |13|[$p.apiGroupsGet]()|A function to retrieve group information. | |14|[$p.apiSendMailUrl]()|This function allows you to obtain the URL for sending emails via API. | |15|[$p.apiSendMail](/manual/script-api-send-mail)|This function sends emails. | ### Value Setting/Update/Get/Delete Scripts (_Elements.js) |No|Function name|Description| |:--:|:---|:---| |1|[$p.id](/manual/script-id)|A function to get the ID value of a record. | |2|[$p.siteId](/manual/script-set-id)|A function to get the ID value of a site. | |3|[$p.loginId](/manual/script-login-id)|A function to get the login ID. | |4|[$p.userId](/manual/script-user-id)|A function to get the user ID of the logged-in user. | |5|[$p.userName](/manual/script-user-name)|A function to get the name of the logged-in user. | |6|[$p.getColumnName](/manual/script-get-column-name)|A function to get the column name (database column name) of the target item. | |7|[$p.getControl](/manual/script-get-control)|A function to get elements from the target item name. | |8|[$p.getField](/manual/script-get-field)|A function to get the field from the target item name. | |9|[$p.getGridRow](/manual/script-get-grid-row)|A function to get the tr tag element of the record on the "[List Screen](/en/manual/table-grid)". | |10|[$p.getGridCell](/manual/script-get-grid-cell)|A function to get the td tag element on the "[List Screen](/en/manual/table-grid)". | |11|[$p.getGridColumnIndex](/manual/script-get-column-index)|A function to get the column number of the record's display name data on the "[List Screen](/en/manual/table-grid)". | |12|[$p.on](/manual/script-on)|A function that can execute any process when each event occurs. | ### Event Firing Script (_Event.js) |No|Function name|Timing|Explanation| |:---|:---|:---|:---| |1|[$p.events.on_editor_load](/manual/script-events-on-editor-load)|When the edit screen is loaded|This is a function that runs when the "Edit Screen" is loaded. | |2|[$p.events.on_grid_load](/manual/script-events-on-grid-load)|When the list screen is loaded|This is a function that runs when the "[List Screen](/en/manual/table-grid)" is loaded. | |3|[$p.events.on_calendar_load](/manual/script-events-on-calendar-load)|When the calendar is loaded|This is a function that runs when the "[Calendar](/en/manual/table-calendar)" is loaded. | |4|[$p.events.on_crosstab_load](/manual/script-events-on-crosstab-load)|When a crosstab is loaded|This function runs when a "[Crosstab](/en/manual/table-crostab)" is loaded. | |5|[$p.events.on_gantt_load](/manual/script-events-on-gantt-load)|When a Gantt chart is loaded|This function runs when a "[Gantt Chart](/en/manual/table-management-gantt)" is loaded. | |6|[$p.events.on_burndown_load](/manual/script-events-on-burndown-load)|When a burndown chart is loaded|This function runs when a "[Burndown Chart](/en/manual/table-burndown-chart)" is loaded. | |7|[$p.events.on_timeseries_load](/manual/script-events-on-timeseries-load)|When a timeseries chart is loaded|This function runs when a "「Timeseries Chart」" is loaded. | |8|[$p.events.on_analy_load](/manual/script-events-on-analy-load)|When an analysis chart is loaded|This function runs when an "[Analysis Chart](/en/manual/table-analy-chart)" is loaded. | |9|[$p.events.on_kamban_load](/manual/script-events-on-kamban-load)|When a Kanban is loaded|This function runs when a "[Kanban](/en/manual/table-kanban-chart)" is loaded. | |10|[$p.events.before_validate](/manual/script-events-before-validate)|Before validating input values|This function runs before a validation check is performed. | |11|[$p.events.after_validate](/manual/script-events-after-validate)|After validating input values|This function runs after a validation check is performed. | |12|[$p.events.before_send](/manual/script-events-before-send)|Before sending data|A function to run before sending data to the server. | |13|[$p.events.after_send](/manual/script-events-after-send)|After sending data|A function to run after sending data to the server. | |14|[$p.events.before_set](/manual/script-events-before-set)|Before updating the screen|A function to run after sending data to the server and before updating the screen contents. | |15|[$p.events.after_set](/manual/script-events-after-set)|After updating the screen|A function to run after sending data to the server and updating the screen contents. |
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.