lockfield (not supported in Axiell Collections)

Syntax

Result = LOCKFIELD(tag, occ, language)

Arguments

result, occ: integer

tag, language: text

Meaning

This function (available from Adlib 7.2) matches the Lock field for editing function, as available in Adlib applications.
For lockfield, the tag parameter must be the data dictionary field tag of the field to be locked, occ the occurrence number of the field occurrence (1 or higher) to be locked, and language should be provided in the form of an IETF language code like 'nl-NL' for Dutch or 'en-GB' for British English (also see the “Using Language Identifiers (RFC 3066)” document which can be found on the internet).

All lockfield() arguments are mandatory. If the relevant field is not multilingual or if it is a multilingual linked field or you want to lock all languages of a non-linked multilingual field at once, then use the string '0' (a zero between single quotes) instead of a language code.
The function returns an integer error code: 0 if successful or a different value if an error has occurred.
Using this function you cannot unlock an earlier locked field.

An example of an application is when you’d like to import data from a previous and/or frozen system, data which should be protected from editing after the import: the new function allows you to lock the relevant field occurrences during the import.

This function is not supported in Axiell Collections.

 

Example

result = LOCKFIELD(BE, 1, 'nl-NL')

Result

Occurrence 1 of tag BE in the Dutch data language will be locked.