Wiki source code of Gestionnaire de bibliothèques de scripts
Last modified by Aurelie Bertrand on 2026/07/15 15:58
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% class="wikigeneratedid" id="HOutils" %) | ||
| 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. | ||
| 3 | |||
| 4 | (% class="box warningmessage" %) | ||
| 5 | ((( | ||
| 6 | ❗ Modifying a JavaScript function affects all measures that use it. | ||
| 7 | ))) | ||
| 8 | |||
| 9 | (% class="wikigeneratedid" %) | ||
| 10 | [[image:en_Script_manager_FR.png||alt="Script library"]] | ||
| 11 | |||
| 12 | **To add a JavaScript function:** | ||
| 13 | |||
| 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. | ||
| 18 | |||
| 19 | You can also import a JavaScript functions file: | ||
| 20 | |||
| 21 | * Click the [[image:en_Load_file_button.png||height="20" width="21"]] button and select the file to import. | ||
| 22 | |||
| 23 | **To duplicate a JavaScript function:** | ||
| 24 | |||
| 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. | ||
| 28 | |||
| 29 | **To rename a JavaScript function:** | ||
| 30 | |||
| 31 | * Click the [[image:en_Rename_button_FR.png||height="20" width="20"]] button and enter the desired name. | ||
| 32 | |||
| 33 | **To delete a JavaScript function:** | ||
| 34 | |||
| 35 | * Select the function you want to delete and click the [[image:en_Delete_button.png||height="21" width="21"]] button. | ||
| 36 | |||
| 37 | (% class="box infomessage" %) | ||
| 38 | ((( | ||
| 39 | You can also access these functions by right-clicking on a JavaScript function. | ||
| 40 | |||
| 41 | [[image:Script_context_menu_en.png]] | ||
| 42 | ))) |