properties
The configuration properties of the component. Note that unlike properties specified on input ports (described later on in the documentation), these properties cannot be configured by the user to use data coming from the components back in the chain of connected components. In other words, these properties can only use data that is known before the flow runs.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-342570503ad13982836f02902c626a33a4746917%252FScreenshot%25202019-03-14%2520at%252015.28.24.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=ece27dc3&sv=1)
Configuration properties are defined using two objects schema
and inspector
.
properties.schema
schema
is a JSON Schema definition (http://json-schema.org) of the properties, their types and whether they are required or not. An example looks like this:
The JSON Schema gives you enough flexibility to describe your property types and the required format, possibly using regular expressions or other mechanisms. When the user fills in the forms in the Designer UI inspector to configure their components, the Designer automatically validates all inputs using the schema. If any of the properties are invalid, the Designer UI gives an immediate feedback to the user that they should correct their configuration:
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-2d3f59866f583929a5edaaaf10bc12d26cef7433%252FScreenshot%25202019-03-14%2520at%252015.30.00.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=1957b1e5&sv=1)
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-a95357aa93753e71bd7a36c2b94b0dfdefbacc2b%252FScreenshot%25202019-03-14%2520at%252015.30.22.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=4d2c990d&sv=1)
properties.inspector
inspector
tells the Designer UI how the input fields should be rendered. The format of this definition uses the Rappid Inspector definition format. Example:
As you can see, fields (e.g. interval
in this case) are nested inside the inputs
object and have the following properties:
type
can be any of the built-in types. See below for more details. (Custom inspector fields are also possible for on-prem installations. See the Custom Inspector Fields page for more details.)group
is an identifier of an Inspector group this field belongs to. As you can see in the example above, you can have one or more custom groups (likeconfig
in this case) that you can define in thegroups
object. Groups will render in the Inspector UI in an accordion-like fashion. This is handy to organize your fields.label
is a short text that appears above your input field. This is a great place to tell your users what your field is.
Inspector built-in types:
text
A single line input field.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-646f479095b0ca30b98b328ea0d95ee6e53bfc63%252Finspector%2520text%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=93477469&sv=1)
textarea
A multi-line text input field.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-1ce0d54db160a0da6387ff86745181905da4dbf0%252Finspector%2520textarea%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=741ae63e&sv=1)
number
A numerical input field. Additional configuration includes min, max and step numbers.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-555d0d0f5013d784fbd251472ca720b45b5a44d0%252Finspector%2520number%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=c795b109&sv=1)
select
A menu of options. Options are defined in the options
array each item having content
and value
properties. Note that content
can be HTML. You can optionally provide placeholder
that is displayed if no option is selected. Default values can be defined with defaultValue
. If you need one of the items to clear the value of the select input field, use { "clearItem": true, "content": "Clear" }
as one of the objects in the options
array.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-29f68d8c835a3e2d019eb12c364698b43664fd1f%252Finspector%2520select%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=cc57108c&sv=1)
multiselect
Similar to select
type, multiselect defines options the user can choose from. The difference is that with multiselect, the user can select multiple options, not only one. The value stored in the flow descriptor is an array of values the user selected. Supported options are options
and placeholder.
date-time
A date-time input field allows the user to select a date/time using a special date/time picker interface. The date-time input field can be configured to support different type of formats or modes (only date or date-time combination). The configuration is stored in the "config" object. The following table shows list of all the available options:
Option | Description |
---|---|
| String representing the format of the date/time. Please see the moment.js library documentation for all the available tokens: https://momentjs.com/docs/#/parsing/string-format/. |
| Boolean. Enables time picker. |
| Boolean. Enables seconds in the time picker. |
| String representing the maximum date that a user can pick to (inclusive). |
| String representing the minimum date that a user can pick to (inclusive). |
| Mode of the date/time picker. Possible values are |
| Boolean. Displays time picker in 24 hour mode without AM/PM selection when enabled. |
| Boolean. Enables display of week numbers in calendar. |
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-e303098530078c6776edd4b45f148cc727bb726c%252Finspector%2520date-time%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=7f9d9b45&sv=1)
toggle
A toggle input field allows the user to switch between true/false values.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-74a0309983c70d63ab7b3365c9adfb9f35240ba3%252Finspector%2520toggle%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=f208ec90&sv=1)
color-palette
A menu of colors. Colors are defined in the options
array each item having content
and value
properties, where values
must be a color in any of the CSS color formats (named-color, hex-color, rgb() or hsl()).
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-462dd789124a7177ea466e75c8db536e7a3605bf%252Finspector%2520color-palette%2520field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=bf085504&sv=1)
select-button-group
A group of toggle buttons. Both single and multiple selection is allowed (can be controlled with the multi
flag). Buttons are defined in the options
array each item having value
, content
and icon
properties.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-15639bf038526dfb58b6a20cc73cd1fa5a3f38e8%252Fselect-button-group.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=c8a63fb8&sv=1)
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-a4f65bc8f2bd7178e34c8fa06cb52a6f68d50126%252Fselect-button-group%2520multi.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d5db6371&sv=1)
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-fcec5375d30c7205d13ce0ad35e947d29290f012%252Fselect-button-group%2520icons.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b50bf17f&sv=1)
expression
A multi-field type field that allows for definition of logical expressions (OR/AND) or dynamic field definitions. This field accepts a list of other inspector field types (text, textarea, number, toggle, ....) and renders a "field builder" UI that enables the user to dynamically create nested fields.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-832f73e03a61c6044a6e5761bb56f238289c99a5%252Finspector-expression-field.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=be444301&sv=1)
The value of this field has the following structure:
Note that by specifying the levels
option, you can define the nesting. Currently, maximum of 2 levels of nesting is supported. The common use case is to use just one level. In that case, set e.g. "levels": ["ADD"]
.
The exclusiveFields
is an optional property which defines the fields that will use variables in an exclusive way. For example let's say that the component has variableA
and variableB
available for use in its fields. Now if the myText
field is in exclusiveFields
array that means that you can use each variable once across all the fields inside the expression groups. To clarify this further, imagine the following scenario configuring an expression type:
Click the
ADD
button to create a second groupSelect
variableA
on themyText
field inside the first group using the variables pickerWhen opening the variables picker in
myText
field inside the second group, onlyvariableB
will be available, becausevariableA
is already been used
filepicker
An input that allows selecting and uploading files from the user's computer. When clicked, it will open the browser's file selector, and the file selected will be uploaded to Appmixer and referenced on the input.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-a0610dbc70810ab3c4139f66135adf8f98765a12%252Fproperties_-_Appmixer.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=8bc53e3&sv=1)
googlepicker
Similar to the filepicker input, this one allows users to select files or folders on their Google Drive accounts. When clicked a Google Drive file picker is opened, showing the user's Google Drive content. When selecting a folder/file, the input value becomes an object which includes the Id of the folder/file which should be used on Google API calls to reference that asset.
![](https://docs.appmixer.com/~gitbook/image?url=https%3A%2F%2F4257661311-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FkpyTqJi517UiwFJJRydZ%252Fuploads%252Fgit-blob-563580b598c5978621006aa6335b1f6e5cc87e2c%252FAppmixer.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b1954136&sv=1)
You can use googlepicker to pick folders instead of files:
This input type needsappmixer.google.drive.GooglePicker
component to be installed.
onedrivepicker
Similar to the googlepicker, this one allows users to select files or folders from their OneDrive accounts. When clicked, an OneDrive file picker is opened, showing the user's OneDrive content. When selecting a folder/file, the input value becomes an object which includes the id of the folder/file which should be used on OneDrive API calls to reference that asset.
The view property works similar to the same property on googlepicker. It can be used to determine what is shown on the picker. You can use 3 values: files
, folder
, all
. As their names indicate, if select files
, only files will be shown, if you select folder
it will show only your folders and if you select all
it will show both. This input type needs appmixer.microsoft.onedrive.OneDrivePicker
component to be installed.
Conditional fields
There are some cases when you want to show input fields depending on other values in the inspector. This allows to a better UX for component configuration. For this we use the when
property in the field we want to be conditional:
The when field has the following structure: { op: { field: comparisonValue }}
.
op: Is the operand that will be used to determine if the condition holds true or false. The following operands are supported:
eq
: Equality between the values.equal
: Equality between the values by deep comparison. Used for objects and arrays.ne
: Values are not equal.regex
: Check if the value in givenfield
matches the regex in thecomparisonValue
.text
: Check if the value in the givenfield
contains the string in thecomparisonValue
.lt
: Check if the value in the givenfield
is less than thecomparisonValue
.lte
: Check if the value in the givenfield
is less or equal than thecomparisonValue
.gt
: Check if the value in the givenfield
is greater than thecomparisonValue
.gte
: Check if the value in the givenfield
is greater or equal than thecomparisonValue
.in
: Check if the value in the givenfield
is included on the givencomparisonValue
array.nin
: Check if the value in the given path is not included in the givencomparisonValue
.
field: The field that is used for comparison, there are several ways to reference the field:
field
: The same form presented in the example. It will search the given fields in current input port fields.properties/someProperty
: Refer to a property inside component properties../field
: It will refer to sibling fields of the current field. Specially useful when working with expression types.
comparisonValue: The value used to compare the field against.
As it was mentioned, conditional fields also work with expression types, allowing to control the field rendering inside those expressions:
properties.source
Sometimes the structure of the inspector is not known in advance and it cannot be hardcoded in the manifest. Instead, the inspector fields are composed dynamically based on the data received from an API. A good example is the google.spreadsheets.CreateRow component where the inspector renders fields representing columns fetched from the actual worksheet. For this to work, we can define the source
property in the manifest that calls a component of our choosing in a so called "static" mode. For example:
In the example above, we call the ListColumns component and we're interested in the output coming from the output port out
.Since this is just a normal component, we need to transform the result into the inspector-like object, i.e.:
We need to tell Appmixer where it can find the transformation function. For this we use the transform
property which tells Appmixer to look for the transformers.js
file inside the ListColumns/
directory. The transformer must return an object with a function named columnsToInspector
that can look like this:
properties.source.url
A special URL that identifies a component that should be called in a "static" mode. It has to be of the form /component/[vendor]/[service]/[module]/[component]
. It should also contain outPort
in the query string that point to the output port in which we're interested to receive data from. Example:
properties.source.data.messages
Messages that will be sent to the input port of the component referenced by the properties.source.url
. Keys in the object represent input port names and values are any objects that will be passed to the input port as messages.
properties.source.data.properties
Properties that will be used in the target component referenced by the properties.source.url
. The target component must have these properties defined in its manifest file. The values in the object are references to the properties of the component that calls the target component in the static mode. For example:
properties.source.data.transform
The transformation function used to transform the output of the target component. It should return an inspector-like object, i.e.:
Example:
The transform function is pointed to be a special format [module_path]#[function]
, where the transformation module path is relative to the target component directory.
Last updated