Assigning references

After you have created a place to store the reference, use the assign statement to establish a reference to a specific resource. The following example creates a reference to the table buffer for the Seller_Data table attached to the current form. The reference is stored in the Main Table reference field.

assign 'Main Table' of window Sellers as reference to table Seller_Data;

You will typically assign references to resources before the resources are first accessed. For example, a reference to a table attached to a form is often created in the form pre script. The reference would be stored by a reference field in one of the windows for the form.

When assigning a reference to a hidden window field, be sure the SavedOnRestart property is set to true. If it is not set to true and the form or window is restarted, the reference field will be cleared and the reference will be lost.



Documentation Feedback