PutFormAttrib

Use this function to save the named attribute and information to a form within your document set. You can add new attributes via this function or update an attribute on a form you specify.

Note Adding or changing a form attribute only affects the current document set. You cannot update the contents of a FORM.DAT or FOR file from a DAL script. Once changed, the attribute will stay with your form even if saved to WIP or archived.

Syntax

PutFormAttrib (Name, Data, Form, Group)

Parameter

Description

Name

Enter the name of the form attribute (metadata).

Data

Enter the value associated with the form attribute (metadata). The default is an empty string.

Form

Enter name of a form to retrieve data from. The default is the current form.

Group

Enter name of the group that contains the specified form. The default is the current group.

If you omit both the Form and Group parameters, the system chooses the current form, based on where the script executes. During Entry (via the Documaker Desktop or the plug-in) this will be the form that contains the DAL script. During Documaker Server processing, the first logical form found within the document set is the current form, unless the script is executed from a section or field rule.

If you include the Form parameter, but omit the Group parameter, the system looks for the form within the current group of forms, as defined by where the script executes. During Entry (via the Documaker Desktop or the plug-in) this is the group that contains the form where the script executes. During Documaker Server processing, the first logical group found within the document set is the current group, unless the script is executed from a section or field rule.

If you omit the Form parameter but include the Group parameter, the system locates the first form within the group you specified.

If the function is successful in adding the attribute to a form, it returns a one (1). If the function is not successful, it returns a zero (0). A failure typically means that based on the form and group name parameters, the function could not locate the form.

Example

In this example assume the form 1111 has this metadata:

Name

Value

Offer

Good until cancelled

Codes

R4,79, ZW

Here is an example:

xx=PutFormAttrib("Restriction", "Must be 18 or older", "1111")

After execution, the form contains the following:

Name

Value

Offer

Good until cancelled

Codes

R4,79, ZW

Restriction

Must be 18 or older

Keep in mind...

See also