Be sure your expression is of the correct type whether assigned to a variable, or used in one of the Expression fields of a record. Here are the types for the various Expression Fields:
Record/ExpressionName | Data Type | Description |
Option and OptionExit |
|
|
Expression | Boolean | When evaluates to true, the Option is presented to customer |
Rate Expression | Decimal | The calculated Rate + Surcharge appears to customer as the rate |
Surcharge Expression | Decimal |
|
Name Expression | String | If present, will override the record Name displayed to customer |
Description Expression | String | If present, the description appears under the Name/Rate line |
| ||
Error and ErrorExit |
|
|
Expression | Boolean | When evaluates to true, the Error message is presented to customer |
Description Expression | String | Required. The description appears under the Name/Rate line |
| ||
Packing |
| |
Expression | Boolean | When evaluates to true, the packing is performed |
Packing Method | literal | E.g. Packing.FirstFitSingleBox . |
Requires Own Package Expression | Boolean | Evaluated for each item |
Sender Expression | Boolean | Evaluated for each item |
Exclude Item Expression | Boolean | Evaluated for each item |
| ||
Reference |
| |
Expression | literal | A reference is a type of variable that is really just a shortcut. |
| ||
| ||
Notes |
| |
Booleans | You can use literals 'true' and 'false'. (lowercase, no quotes) | |
Strings | Be sure to put literals in double
quotes. | |
Decimals, Doubles, Singles | Literals must include a decimal
point "." regardless of localization | |
DateTimes | Construct literals using DateTime() - e.g. DateTime(2010,8,9). If using DateTime.Parse(dateString), beware of localization parsing. | |
Rate and Surcharge Expression | Numeric only. Do not include any leading currency symbol. |