$USP_CHECK_NEW_OCC
Determines whether the webget command will check for new occurrences when processing data submitted in a static server page (USP). Applicable only during compilation.
$USP_CHECK_NEW_OCC
{=
} {On
| Off
}
Arguments
On
—the webget command will check for new occurrences created in the client. If the data contains new occurrences, $error is set and the entity's error trigger is fired. ProcScript in the trigger can determine whether the new occurrence is allowed or discarded.Off
—the webget command will not check for new occurrences. If the data contains new occurrences created in the client, they may be stored in the database.
Defaults
Assignment file: | IDE assignment file |
Section: | [SETTINGS] |
Default value: | Off
if it is not present in the assignment file
|
Description
If the assignment setting $USP_CHECK_NEW_OCC is in effect when the USP is compiled, it affects the way that webget handles new occurrences that have been created in the client.
If it is not present, or it is set to off
,
webget creates a new occurrence on the server and continues processing, and the
occurrence may be stored in the database.
If the assignment file contains
$USP_CHECK_NEW_OCC{=on
}, webget sets
$error to 2014
causing the entity's
OnError trigger to be fired. You can use ProcScript in this
trigger to inspect the incoming field data of this new occurrence and decide what to do with
it.
For example, you can use
discard to remove the occurrence before proceeding. If you expect new
occurrences created in the client, you can simply return 0
in the trigger.
webget continues processing and will include the new occurrence when data is
stored.
If you return a negative value in the error
trigger, webget stops further processing and clears the component. The
detail trigger is not fired and error -260
<UWEBERR_OCC_REJECTED>
is returned.
Setting $USP_CHECK_NEW_OCC
[SETTINGS] $USP_CHECK_NEW_OCC = on