Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • array: denoted by `[MyType]` (contains an array of references to 'MyType')
  • map: denoted by `map<int, MyType>` (left argument is the key which can be any primitive type; right argument can be any C3.ai Type.)
  • set: denoted by `set<MyType>`
  • stream: denoted by `stream<MyType>`. (This is a read-once type of collection).

...

Please see the 'Foreign Key Collection and Schema Names" section in the following C3.ai Develop Documentation for more details: https://developer.c3.ai/docs/7.12.17/topic/mda-fields

Calculated Fields

These Calculated fields are derived from other fields on a C3.ai Type. Calculated fields typically included either JavaScript code or C3.ai ExpressionEngineFunctions, and are specified as follows:

Code Block
fieldName: FieldType [stored] calc "field_formula"

...

There are two types of calculated fields:

  1. Simple calculated fields: the values of these fields are calculated at runtime and not stored. To define a simple calculated field, use the following syntax - keyword `calc`, followed by an expression formula
  2. Stored calculated fields: the values of these fields are stored in the C3.ai Type's database table. To define a stored calculated field, use the following syntax - keywords `stored calc`, followed by an expression formula (e.g, in the SmartBulb example above,

...

  1. 'stored calc fixtureHistory[0].(end == null).to')

...

  1. .

C3.ai Developer Resources on Fields:

...