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

$sort.field

sortField

Used to identify the field chosen for sorting.

2

$sort.datatype

sortDatatype

Used to identify the data type of the field chosen for sorting.

3

$sort.direction

sortDirection

Used to identify the sorting direction (ascending or descending) of the field.

4

$page.end

pageEnd

Used to indicate the index end.

5

$page.size

pageSize

Used to indicate the number of records to be fetched from the starting index.

6

$page.start

pageStart

Used to indicate the starting index of the records fetched.

7

$context.accessToken

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

$context.apiKey

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

$filter.value1

filterValue1

The field value searched by the user.

10

$filter.value2

filterValue2

The second field value searched by the user (in case of a range of values).

11

$filter.fieldName

filterFieldName

The column ID of the field which must be filtered.

12

$filter.Operator

filterOperator

The search condition used to filter the field data (for example, =, >, <, and so on).

13

$filter.datatype

filterDatatype

The data type of the field value (string, date, int, and so on).

14

$filter

filter

It is a predefined object which contains the array of runtime filters specified by the user.

15

$extraParams

extraParams

It is a predefined object which contains the array of extra parameters obtained as a request.

16

$request

request

It is a predefined object which contains the request parameters.

17

$user

user

It is a predefined object which contains the user number, ID, and GCIF.

18

$session

session

It is a predefined object which contains the session attributes.

19

$userPref

userPref

It is a predefined object which contains the user preferences.

20

$context

context

Master object consisting of all the predefined objects such as $request, $user, $filter.Operator, currentUserNo, currentGCIF, and so on.

21

$response

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.

Copyright © Intellect Design Arena Limited.

All rights reserved. These materials are confidential and proprietary to Intellect Design Arena Limited and no part of these materials should be reproduced, published in any form by any means, electronic or mechanical including photocopy or any information storage or retrieval system nor should the materials be disclosed to third parties without the express written authorization of Intellect Design Arena Limited.