How do I add hyperlinks to ChemFinder?
This can be done via the "Table Script" feature to show hyperlinks in subforms.
You need to create a table with a column of text entries for the links, and another column of ID's to link to the main records, and display the links in a subform. Then in the subform properties you specify a "table script," a CAL script. The items in the subform then show up in link style (blue underlined), and when you click one, it executes the script.
- In your ChemFinder form, create a subform.
- Set the datasource for the subform to a new table by clicking Create Table... in the Table tab of the Subform Properties dialog.
- Call the new table whatever you like, say URLs.
- Now create a new text field in this table called URL (in the Field tab of the Subform Properties dialog).
- In the Subform tab of the Subform Properties dialog, set up the link between the main table and the subtable.
- Also on the Subform tab, press the Edit... button next to the Table script field.
- In the script editor dialog that comes up, choose the CAL radiobutton, and enter this script:
getdata 1 URL
- Click OK to go back to the Subform Properties dialog.
- In the Form tab of the Subform Properties dialog, check Generate Form, and then OK.
- Add the necessary records to the subtable; you may want to remove the box for the linking field afterwards to it won't be visible.
- Click in the subform, to make sure it is the active form, and then set the view for the subform to be Data Table view.
- Now you should see that the URL you typed is a hyperlink. When you click on it, it will open up the default web browser to that page.