Wiki source code of Gestionnaire de bibliothèques de scripts
Last modified by Aurelie Bertrand on 2026/07/15 15:58
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | (% class="wikigeneratedid" id="HOutils" %) |
| |
3.1 | 2 | The **Scripts Libraries Manager** allows you to create JavaScript functions that can be used when [[creating measures>>doc:Digdash.user_guide.studio.Create_datamodel.configure_data_model.Configure_columns.Create_new_measure.Create_calculated_measure.WebHome||anchor="Advanced measure"]]. You can also import them via a file. |
| |
1.1 | 3 | |
| 4 | (% class="box warningmessage" %) | ||
| 5 | ((( | ||
| |
3.1 | 6 | ❗ Modifying a JavaScript function affects all measures that use it. |
| |
1.1 | 7 | ))) |
| 8 | |||
| 9 | (% class="wikigeneratedid" %) | ||
| |
3.1 | 10 | [[image:en_Script_manager_FR.png||alt="Script library"]] |
| |
1.1 | 11 | |
| |
3.1 | 12 | **To add a JavaScript function:** |
| |
1.1 | 13 | |
| |
3.1 | 14 | 1. Click the **+** button above the function list. |
| 15 | 1. In the **New** dialog box that appears, enter the function name with a .js extension, then click **OK**. | ||
| 16 | ➡ The function is added to the left list. | ||
| 17 | 1. Enter the function code in the **Script** section on the right. | ||
| |
1.1 | 18 | |
| |
3.1 | 19 | You can also import a JavaScript functions file: |
| |
1.1 | 20 | |
| |
3.1 | 21 | * Click the [[image:en_Load_file_button.png||height="20" width="21"]] button and select the file to import. |
| |
1.1 | 22 | |
| |
3.1 | 23 | **To duplicate a JavaScript function:** |
| |
1.1 | 24 | |
| |
3.1 | 25 | 1. Select the original function and click the **arrow** button to the right of the **+** button, then **Duplicate**. |
| 26 | ➡ A copy of the function is added. | ||
| 27 | 1. Rename it and modify the JavaScript code as needed. | ||
| |
1.1 | 28 | |
| |
3.1 | 29 | **To rename a JavaScript function:** |
| |
1.1 | 30 | |
| |
3.1 | 31 | * Click the [[image:en_Rename_button_FR.png||height="20" width="20"]] button and enter the desired name. |
| |
1.1 | 32 | |
| |
3.1 | 33 | **To delete a JavaScript function:** |
| |
1.1 | 34 | |
| |
3.1 | 35 | * Select the function you want to delete and click the [[image:en_Delete_button.png||height="21" width="21"]] button. |
| |
1.1 | 36 | |
| 37 | (% class="box infomessage" %) | ||
| 38 | ((( | ||
| |
3.1 | 39 | You can also access these functions by right-clicking on a JavaScript function. |
| |
1.1 | 40 | |
| |
3.1 | 41 | [[image:Script_context_menu_en.png]] |
| |
1.1 | 42 | ))) |