in the grid parts of the rapid development platform, you can add virtual computed columns to the interface, assuming that there is a unit price in a business, a quantity field, but no total price for this field, you can add the column by adding an expression on the interface. Add an expression computed column to add a computed column to different business requirements.
Syntax:The name of the mesh part. Addexpressioncolumn ("ColumnName", "[Base salary]*0.2", 2) Add an expression computed column, the first parameter is a column name, and the second argument is a computed column expression. The third parameter is the column type: 1: Integer, 2: Number, 3: Time, 4: String, 5: Boolean, 6:objcet
Example:Grid Part 1. Addexpressioncolumn ("Total", "[Lilun]+[shijian]", 2) grid Part 1. Addexpressioncolumn ("80% theory", "[lilun]*0.8", 2)
Effect:[Theory]+[practice]= Total, [theory]*0.8=80% theory
Description:The following expression is obtained by setting: Grid Part 1. Addexpressioncolumn ("Total", "[Lilun]+[shijian]", 2) is obtained by setting the following expression: Grid Part 1. Addexpressioncolumn ("80% theory", "[lilun]*0.8", 2)
we can see from the above example that1, the first calculated field name we can define by ourselves, and we need to double quotation marks;2, within the expressionThe field must be in the[]the brackets enclose,The fields Here are the fields in our database, and the expressions must also use double quotation marks;3, select a type based on the column type.
Original address: http://bbs.delit.cn/thread-361-1-1.html
Reprint please specify the source:
Author: metric Technology www. Delit. cn
Grid part Add expression calculation column usage introduction