Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Custom Fields are a great method to create unique configurations for a specific component. This becomes very powerful when scaling your integrations and creating component templates with unique custom fields configured for each deployment.

In your Translator scripts, you can:

 Access your custom fields

component.fields() to access a lua table of all configured custom field names and values.

Here, we are storing our custom fields key value pairs in a variable called configs that can bw call in the script to pass configuration values like the database name we are connecting to.

 Add values to existing custom fields

component.setFields{} can be used to automate creating a custom field name and value. For example, when querying an API or Database, you can store particular as custom fields.

Here, we are querying a weather API and storing the current temperature as a custom field.

  • No labels