Canvas Reserved Keywords and Predefined Objects
Following are the list of keywords and predefined objects that can be provided by you in the Request JSON Configuration field.
S.No | Canvas Keyword | Alias Name to be provided by the User | Description |
---|---|---|---|
1 |
| sortField | Used to identify the field chosen for sorting. |
2 |
| sortDatatype | Used to identify the data type of the field chosen for sorting. |
3 |
| sortDirection | Used to identify the sorting direction (ascending or descending) of the field. |
4 |
| pageEnd | Used to indicate the index end. |
5 |
| pageSize | Used to indicate the number of records to be fetched from the starting index. |
6 |
| pageStart | Used to indicate the starting index of the records fetched. |
7 |
| accessToken | This is a predefined object containing the value of the access token for the service. This is useful in JSON configuration if we want to pass the value of token in a particular field. |
8 |
| apiKey | This is a predefined object containing the value of the API key for the service. This is useful in JSON configuration if we want to pass the value of token in a particular field. |
9 |
| filterValue1 | The field value searched by the user. |
10 |
| filterValue2 | The second field value searched by the user (in case of a range of values). |
11 |
| filterFieldName | The column ID of the field which must be filtered. |
12 |
| filterOperator | The search condition used to filter the field data (for example, =, >, <, and so on). |
13 |
| filterDatatype | The data type of the field value (string, date, int, and so on). |
14 |
| filter | It is a predefined object which contains the array of runtime filters specified by the user. |
15 |
| extraParams | It is a predefined object which contains the array of extra parameters obtained as a request. |
16 |
| request | It is a predefined object which contains the request parameters. |
17 |
| user | It is a predefined object which contains the user number, ID, and GCIF. |
18 |
| session | It is a predefined object which contains the session attributes. |
19 |
| userPref | It is a predefined object which contains the user preferences. |
20 |
| context | Master object consisting of all the predefined objects such as $request, $user, $filter.Operator, currentUserNo, currentGCIF, and so on. |
21 |
| response | It's a predefined object which contains the parameters available in the response to the request to fetch data for view. |
22 | $form | form | This is a predefined object that contains the form data submitted by the end user. |
Keywords used for Canvas internal purpose are as follows:
S.No | Canvas Keyword | Description |
---|---|---|
1 | inheritModel | Used to combine logical JSON blocks. |
2 | ignoreKey | Used to indicate that a particular field (key) must be ignored in the combined JSON. |
3 | mergeKey | Used to indicate that a particular field (key) must be added in the combined JSON. |
4 | function | The function specified in the metadata has the logic to tweak the JSON. For example, we will have to iterate through the filter array and prepare the JSON objects before adding the objects to the JSON payload. This logic is provided as a sample implementation in Canvas as 'andFilter' method in the DefaultRestServiceInstruction.java class. |