Key terms and concepts for your upgrade
devMode: true
flagged imports as “dev” imports, but in Platform, there are true Environments.
You can have many custom Environments, but upon signup, you will have a Development, Production, and Demo Environment configured.
All of the other entities (like Spaces, Workbooks, and Sheets) will live in those Environments.
name
and the sheets
properties.
Sheets will share many properties with those found in the Portal schema. You’ll encounter a name
property (akin to the type
property in a Portal schema) and fields
(which closely resembles your Portal fields
array).
When it comes to the fields
array, you’ll find quite a few familiar elements like key
, label
, and description
, which all transition directly from Portal.
type
property for fields. When you don’t specify this field, both Portal and Platform will assume a default string
type. In Portal, the type: "checkbox"
is now "type": "boolean"
, and the type: "select"
is now "type": "enum"
in Platform.
Furthermore, keep in mind that while Portal only had three types, Platform has broadened its range to include number
, date
, and reference
types. To get more details about these new field types, you can check out our documentation. Also, we’ve prepared a handy reference table below, outlining all the new types and how they were handled in Portal.
Portal Type | Platform Type |
---|---|
String | String |
String | Date |
String | Number |
Select | Enum |
Checkbox | Boolean |
N/A | Reference |
options
array that has
the same structure as it did in Portal. However, one thing to note is that
this options array has been moved into a new property on the field object
named config
for Platform.validators
from Portal. While Portal offered many different kinds of validators, only two have been converted in the fields themselves, and those are required
and unique
. All other validations can still be handled, but are now handled in code instead of a setting. Check out the other validators section for examples.
The validators
property will now be called constraints
which is still an array of objects. The object for each validator has traded in the validate
property for a type
property, but the unique
and required
values remain the same.
required
and unique
validators, but validators like regex
or required_with
are now handled in code in a Listener.
Regex Validation Example:
required_with
Validation Example:
webhookUrl
-OR- use the returned data within the Promise to do whatever needed to be done with your data. With Platform, we use the Listeners to wait for the submit action to happen and then act on it.