43
« Last post by ZuluTen on November 07, 2025, 01:33:30 am »
I am completely confused by the use of a script with a Custom Table, and wonder whether someone might please explain:
I have added a CustomTable to a diagram.
I can then, as per the manual, press Ctrl-Alt-7 whereupon a ‘child’ element titled “script()” appears in the Project Browser under the CustomTable. I can drop in some JavaScript, and save it.
Then following the manual (yes, foolish I know), I close the script editing tab, and revert to the diagram upon which the Custom Table is shown.
The manual actually says "If an associated script has been defined for the table, it can be run by right-clicking the table while it is not in edit mode then choosing the option 'Run Custom Table Script'." but I can see no such menu item. Instead, there is a “Execute Behaviour Script” option, but it is greyed out.
Consequently I can see no way to run the script.
Now, by taking a different approach, and generating a fresh Custom Table:
If I right click on the Custom Table in the Project Browser:, and follow “Features” I am offered the options to “Edit Behaviour” and “Edit Internal Code.”
When I select Edit Internal Code I am presented with a new tab that shows the parent Custom Table, with beneath (i.e. subservient) it “Internal Code”, and beneath that “Code” and “script”.
When I put something in this ‘new’ version of script, save and close it, then the “Execute Behaviour Script” command is no longer greyed out, and can be actioned (I think).
However, having done that, the code snippet that I dropped in using the second editing technique is not visible using the first technique, and vice versa.
Can someone please explain to me why there are apparently two different script receptacles, and what, if anything, should go in code?
Many thanks
BTW: I've tried this on different machines, with both v16.1 and v17.1 and am seeing the same result.