2 Field basical operation interface (Apply for all field types)
1 Convert field name to field id
This method support to achieve multi-form, multi-environment, code block commonly using; decoupling code block specified fieldid convertFieldNameToId:function (fieldname, symbol, prefix)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldname | String | Yes | Field name |
symbol | String | No | Form label, main table (main)/ specific schedule (detail_1), default main |
prefix | Boolean | No | Returns whether the value needs to field a string prefix, default to true |
Example
2 Gets a single field value
getFieldValue:function (fieldMark)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${ field ID}_field${ line number} |
Example
3 Modify a single field value
This method modifies fields that, if they involve trigger linkage, cell formatting, etc., automatically trigger linkage/format change values in a format similar to other scenarios changeFieldValue:(fieldmark, valueInfo)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${ field ID}_field${ line number} |
valueInfo | JSON | Yes | The field value information, the non-browsing button field format is {value:" modified value "}; the specialobj is browsing button information, array format; the showhtml property is only valid for single line text type and read-only; |
Example
4 Change the single field display properties (read-only/mandatory, etc.)
changeFieldAttr:function (fieldMark, viewAttr)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${fieldID}_field${line number} |
viewAttr | int | Yes | Change the status of the field ,1:Read-Only ,2:Editable ,3:Mandatory ,4:Hidden the field label and content |
Example
5 Modify field values and display properties
changeSingleField:function (fieldMark, valueInfo, variableInfo)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${fieldID}_field${linenumber} |
valueInfo | JSON | No | Field value information, consistent with interface 2 format, example :{value:" modified value "} |
variableInfo | JSON | No | Change property, example :{ viewAttr:3} |
Example
6 Batch modification of field values or display propoerties
changeMoreField:function (changeDatas, changeVariable)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
changeMoreField | JSON | Yes | Modified field value information set |
changeVariable | SON | No | Modified field display property collection |
Example
7 Trigger specific field and all related linkage
Note: Manually triggering all linkage involved in a single field, including field linkage, SQL linkage, date-time calculation, field assignment, formula, row rules, display attribute linkage, selection box linkage, bindPropertyChange event binding, etc.
Scenario: triggered subprocesses open default non-execution field linkage, archive node view form non-execution linkage
triggerFieldAllLinkage: (fieldmark)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${ field ID}_field${ line number} |
8 Obtain field information base on field ID
Note: obtain field information according to field ID, JSON format, including name, type, read-only properties, etc.
getFieldInfo:function (fieldid)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldid | String | Yes | Field ID, without any indication |
Return value propoeties description
Parameter | Remarks |
---|---|
htmltype | field large type (text/multiline text...) |
detailtype | field small type (integer/float...) |
fieldname | field database name |
fieldlabel | field display name |
viewattr | field attribute (1: read-only 2: editable 3: required) |
9 Get field current read-only/mandatory properties
This method is to obtain field display properties in real time, including possible changes such as display property linkage, code interface change, done, detail existing fields can not be modified, not only field properties of background configuration;
If you only want to obtain field properties of background configuration, call interface 3.8 return value viewattr property
getFieldCurViewAttr:function(fieldMark)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMark | String | Yes | field designation, format field${fieldID}_field${linenumber} |
Last updated