respAdd3StateField()
This procedure adds 3-State field into response. Procedure converts input 3-State value (text) into JSON true/false/null values then store it as field value. The input value is converted using several converson patterns.
| Parameter | Type | Description | |
|---|---|---|---|
| element | 30A VARYING, VARSIZE | Mandatory | Name of element |
| fieldName | 30A VARYING, VARSIZE | Mandatory | Field name |
| value | 10A | Mandatory | Input 3-state value (text) |
| pattern | 10I 0 | Optional | conversion pattern |
Following input boolean values are supported:
- ’true'
- ‘false’
- ’null'
- ‘Y’
- ‘N’
- *BLANK
- ‘1’
- ‘0’
Following conversion patterns are sypported:
- #true_false_null (default)
- #Y_N_BLANK
- #1_0_BLANK
The procedure returns pointer of field. If procedure can’t add field, then returns null.
Examples: