User Tools

Site Tools


tplextensionblobincontrol.htm
Navigation:  Templates > Guide to all Templates > Extension Templates >====== BLOBInControl Extension Template ====== Previous pageReturn to chapter overviewNext page

The BLOBInControlExt extension template allows you to display and/or edit a BLOB from a selected table.

Normally, BLOB processing involves populating a local or global variable that will load the BLOB contents from a selected table. As the BLOB is updated, the contents of the control is transferred back to the BLOB and stored in the table. This template is designed to handle all of the processing that is necessary to do this.

The use of this template is valid in Browse, Form, or Report procedures to retrieve (read) a BLOB's contents and assign it to a control. In addition, you can also save (write) the BLOB's contents in the Form procedure.

A list box is provided to allow you to enter multiple BLOB controls. On the BLOB Fields Properties window, the following template prompts are provided:

BLOB Field

Select from the drop list the target BLOB field defined in the table that will be displayed and potentially updated (if used on a Form).

Control

Select the Field Equate Label, from the drop list, of the control that will be used to display and/or update the BLOB contents. This control must be either a text or image control, depending on whether the type of information contained in the BLOB column is text or Binary (i.e. Image) data.

If this is a text control, the use variable for the control must be a string type variable and it must be large enough to hold the largest potential Blob data in the associated Table that you plan to update.

When Image does not exist use the following image ' Image File:

If the control is an image control, enter the name of a valid image file (or press the ellipsis button to select one) that will display if an image does not exist in the target BLOB control.

Resize to control size

Check this box if you would like the BLOB's contents to resize to fit the image control. If not checked, the default size as stored in the BLOB is used. Using the default could cause the image to display cropped if the image control is too small.

Condition to assign from control to BLOB

Enter an expression in the Condition field which will force the BLOB to be updated from the target control only when the expression evaluates to TRUE. Press the ellipsis button to select a variable to use in the expression.

By default, this setting is TRUE, which means that the BLOB field will always be updated when the Form is Accepted, even if the BLOB contents did not change. To improve program performance and network traffic, enter a condition that will cause the BLOB to be updated only when necessary.

For example:

?Text{PROP:Touched}=True !was the text field modified?

or

CLIP(LOC:ImageFileName)<;>'' !was an image loaded into BLOB?

tplextensionblobincontrol.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1