postadjust
postadjust
DATABASE
,
KEYFIELD
,
KEYVALUE
,
DATAFIELD
,
DELTA
,
MINIMUM
,
MAXIMUM
,
AUTOSAVE

The postadjust statement adjusts the value of a numeric field in another database, by adding (or subtracting) a number.

Parameters

This statement has eight parameters:

database – Name of database you want to post data to. The database must be open.

keyfield – Name of the field you want to search in.

keyvalue – Value you want to search for.

datafield – Name of the field that will be adjusted. This must be a numeric field.

delta – Value to be added (use negative values for subtraction).

minimum – Minimum value of field to be modified. If this parameter is -1 then there is no minimum (and negative values will be allowed). If new value would be less than this the field will not be adjusted and an error will be returned.

maximum – Maximum value of field to be modified. If this parameter is zero then there is no maximum. If new value would be greater than the maximum the field will not be adjusted and an error will be returned.

autosave – If this parameter exists and is true then target database will be saved after being modified. If this is a web procedure then this parameter can specify a number which will be used as a parameter to the websave statement. A default of websave 8000 will be used if the AUTOSAVE parameter is set to true.

Description

This statement adjusts the value of a numeric field in another database, by adding (or subtracting) a number. This example decrements four from the quantity on hand for the product identified in the LineSKU field or variable.

    postadjust "Inventory", "SKU", LineSKU, "OnHand",-4,0,0

See Also

- deletechildren -- deletes all the records in another database that have a value in the key field that is equal to the key value.
- deleterecchildrenwarn -- warns you before deleting the current record from the active database and all the records in another database that have a value in the key field that is equal to the key value.
- deleterecordandchildren -- This deletes the current record from the active database and all the records in another database that have a value in the key field that is equal to the key value.
- post -- assigns a value to a field in another database.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.