Other Code Editor Functions


Covers setting the relationship between tables, using the script navigator, OLE automation browser, Xbasic script genie, global variables, and the cascading style sheet builder.

Set Relationship Between Tables

When you have the Code Editor open, selecting Code > More Genies > Link Tables displays the Set Relationship Between Tables dialog box. This dialog box generates the Xbasic code necessary to open a parent and child table in a set relationship.

  1. Select the Parent table name from its drop-down list box.

  2. Select the Child table name from the its drop-down list box.

  3. Select the linking field from the parent table or enter a link expression in the Parent Link Expression list box. Click the 'xy' button to display the Expression Builder to help define a link expression.

  4. Select the linking field from the parent table or enter a link expression in the Child Link Expression list box. Click the 'xy' button to display the Expression Builder to help define a link expression. The values generated here must match the values generated from the parent table.

  5. Select the Link Type. The options are:

    • "One-to-many"

    • "One-to-first (One-to-one link)"

    • "One-to-last (One-to-one link)"

    • "One-to-closest (One-to-one link)"

  6. Select a value for Referential Integrity. The options are:

    • "None" - the default

    • "Cascade changes/deletes"

    • "Prevent changes"

  7. Select a value from Include Record from Parent table. The options are:

    • "Always - even if no matching child record exists"

    • "Only if a matching child record DOES exist"

    • "Only if a matching child record DOES NOT exist"

  8. Optionally, add a filter expression in the Child Table Filter field. Click the 'funnel' icon to display the Filter Builder to help create a filter expression.

  9. Optionally, add an ordering expression in the Child Table Order field. Click the 'up down arrows' icon to display the Order Builder to help create an order expression.

  10. Optionally, check Unique records only.

  11. Optionally, check Descending.

  12. To paste the code later, click Copy code to the clipboard.

  13. To paste the code immediately, click Insert Code in Script Editor.

  14. Click Close to finish.

Script Navigator

The Script Navigator shown below is a floating toolbar that you can open while you are editing a script.


It shows a list of the functions that have been declared in the script and lets you quickly navigate, within the script, to a particular function (double click to go to the selected function). You can also select a function, and pop up a small window showing the definition of that function. Picture


Xbasic Explorer

Select View > Xbasic Explorer or click the 'wrench' icon to open the Xbasic Explorer. This utility provides a handy reference that lists all:

  • Xbasic language commands and their syntax

  • System constants

  • Functions, organized by their return variable types,and their syntax

  • Global functions

  • System objects, and their methods, properties, variables, and calculated values.

  • Global variables

  • Sessions

OLE Automation Browser

The View > OLE Automation Browser command displays the OLE Automation Object Browser. This is useful for advanced users who want to use OLE Automation. The browser shows a list of all of the registered ActiveX controls, their classes, and methods. You can right-click on a function name in a script, and go to the definition of that function within the script you are editing.

Xbasic Script Genie

The Xbasic Script Genie generates the Xbasic code associated with the library of Action Scripting actions. The result of the process is code that is ready to be copied and pasted into your script or function.

  1. While the Code Editor is open, select Code > Xbasic Script Genie.

  2. Select a category of actions from the Category list.

  3. Select an action from the Action list and click OK.

  4. Provide the data required by the various genie dialog boxes.

  5. Optionally, click Copy code to the clipboard.

  6. Optionally, click Insert Code in Script Editor.

  7. Click Close to finish.

Global Variables

Select View > Global Variables to display the Global Variables dialog box. This dialog lists all the global variables that are currently defined and those that are initialized at startup.

  1. Click Add to display the Add Global Variable dialog box

    • 1. Enter a name in the Name field.

    • 2. Optionally, enter an initial value in the Value field. To initialize a variable with an expression, prefix it with an equals sign "=". Do not use quotes for character values.

    • 3. Select a type in the Type field.

    • 4. Click OK to continue or Cancel to discard your inputs.

  2. To delete a global variable, select it and click Delete.

  3. To change a property of a variable, select it and click Edit.

Cascading Style Sheet Builder

Right click and select Genies ... > CSS Style Builder to display the Webform Style Builder.