Script Library
The Script Library is a centralized space in Process Studio for storing and managing reusable C# code snippets. These scripts serve to extend the native functionalities of views (interface behavior, specific calculations, custom buttons, etc.) without having to rewrite code for each view.
1. Management Interface
The interface is designed to logically organize your technical extensions.

Available Scripts (Left)
Scripts are organized by category (e.g.: Buttons, Filters, Formatting). This tree structure allows you to quickly find functionality to apply to a view.
Parameters and Editor (Right)
For each script, you define:
- Name: Script identifier.
- Category: The folder in which it will be classified.
- SQL post-query code (OnLoad): This block is executed when the view loads. It's generally used to initialize components or attach events to the data grid.
- Extended code: This space allows you to declare classes, utility methods, or complex event handlers that will be called by the rendering engine.
2. Available Actions
The library ribbon allows you to manage the lifecycle of your scripts.

- New: Create a new entry in the library.
- Save: Save changes to the database.
- Deploy: Apply or remove the script from one or more selected views. This action compiles and updates the code of affected views in a single operation (mass deployment).
- Refresh: Reload the script list from the server.
- Delete: Permanently remove the script from the library.
3. Common Usage Examples
The library typically contains standard scripts to meet recurring needs:
| Category | Description |
|---|---|
| Buttons | Adding custom buttons to the view ribbon (e.g.: Specific export, Mass validation). |
| Filters | Customizing filter behavior (e.g.: accent-insensitive or case-insensitive search). |
| Headers | Modifying column title display or adding specific contextual menus. |
| Menu Hiding | Dynamically hiding certain standard menu options based on context or permissions. |
| Formatting | Specific data alignment, conditional row or cell coloring. |
4. Using in a View
There are two methods to associate a library script with a view:
A. From the View Designer
- Open your View in the designer.
- Go to the Script tab.
- Check the library scripts you want to activate for this specific view.
B. From the Library (Mass Deployment)
This is the most efficient method. By clicking the Deploy button in the library, a window allows you to check (to activate) or uncheck (to remove) the script across all views in the application.
[!TIP] Using scripts from the library is preferable to writing specific code in the view's Code tab, as it facilitates overall maintenance: a modification in the library can be quickly propagated to all affected views via the deployment action.
See also: