Last modified by Aurelie Bertrand on 2026/07/15 15:58

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