This server behavior is used to setup the order discount. To give you the max flexibility you must create the recordset with the standard Dreamweaver recordset behavior so you can define the recordset filter like you need, besed on the user account or other methods.
To search the discount my asp code scan all the records in the recordset and get the value from the record where the value of the "Calculate on" is between the value of the "From Field" and the value of the "To Field" and use the filter method like you setup in the filter combo box so you can setup if use the formula:
"Calculate on" > "From Field" and "Calculate on" <= "To Field"
or the formula
"Calculate on" >= "From Field" and "Calculate on" < "To Field"
after my code find the right record get the value of the "Value Field" and calculate the discount in percentage or in absolute value like you select in the "Value Type".
The recordset name where get the discount setup
The recordset field where find the From Value used to detect the right record where get the discount value
The recordset field where find the To Value used to detect the right record where get the discount value
The filter method used to compare the "Calculate On" with the "From Field" and "To Field" values
The recordset field where find the discount value
You can select if the value find in the recordset is a percentage or an absolute value
The column cart sum used to calculate the discount
The number of decimal you need have for the Discount amount.