$WBP$

Availability
UPDATE command

Syntax
$WBP$NumericValueToBeAdded

Description
This is a form field value prefix for doing mathematical operation of addition with values of fields of numeric type. When WBSP engine receives a WBF_tablefieldname form field value with this prefix for database table field of numeric type, instead of replacing the old value with new one, it will add new value to the existing one (so new value stored in the database is NewFormValue+OldDatabaseTableFieldValue)

Here's an example:

<!--
[FormFields]
WB_BaseName=biblioA.mdb
WB_RcdSet=Titles
WB_Command=Q
-->
<!--WB_BeginTemplate-->
<html>
<body>
<!--WB_BeginDetail-->
<form action="TitlesUpdate.wbsp" method="POST">
<input type="hidden" name="WBF_Qty" value="$wbp$10">
<input type="hidden" name="wbf_isbn" value="$wbf[isbn]">
$wbf[Title]<br>
Current quantity: $wbf[Qty]<br>
<input type="submit" name="sUpd" value="Add 10 books">
</form>
<!--WB_EndDetail-->
<center>$wbnavigator</center>
</body>
</html>
 

After running this example (and pressing the "Add 10 books" button), field Qty in updated record of table Titles will be increased by 10.