I generally find it easier to add the script from the GUI interface. The scripts are usually hidden in Dashboard Mode, but you can switch to Application Builder using the option in the red-triangle menu:
![DashboardMode.png DashboardMode.png](https://community.jmp.com/t5/image/serverpage/image-id/9487i56A33FD9D0610D6D/image-size/medium?v=v2&px=400)
Then you can switch to the "Scripts" tab for Module1 and enter the script there:
![DashboardScript.png DashboardScript.png](https://community.jmp.com/t5/image/serverpage/image-id/9488iC815909A247C388E/image-size/medium?v=v2&px=400)
I've attached a sample Dashboard that demonstrates this.