Duzzit Inputs

Duzzit logic usually depends upon information that is input to a Duzzit. Almost all duzzits make use of input values, input driving sources, or a combination of the two. For a duzzit run in a web page or widget, inputs are form fields. For a duzzit run as a web service, inputs are url parameters. For duzzits run from a file (uploaded or via ftp), inputs are mapped from file values. For duzzits run via an email, inputs can be defined to implicitly be filled with data from an email, and input mappings may also be specified within the email body.

Input Values

An input value can be a holder for any information that is needed to run a duzzit. For example, a duzzit that looks up a customer might have a customer id as an input value. A duzzit that looks up the weather might have a zip code as an input value.

To add an input value, click on the “(add)” link next to Input Values:

A pane appears allowing you to enter an input value:

You need to specify a name for the value. You also need to choose a data type for the input. Data type choices include the following:

  • text
  • number
  • decimal
  • true/false
  • XML
  • JSON

The XML and JSON inputs are special types that support using pulling in entire structures as a single duzzit input. For example, lets say we want to pull in xml following this structure:

<contact>
    <firstname></firstname>
    <lastname></lastname>
</contact>

To do this, we select the XML data type, and then paste this xml snippet into the “Sample Data” area.

After saving the input, the xml attributes now appear as an input source.

Similarly, if a JSON object is expected as an input, the data type can be defined as “JSON”, and a JSON snippet can be pasted as sample data:

After saving the input, the json attributes appear as an input source.

Other input settings include:

  • Default Value: You can optionally define a default value, which will be used if an input value is not provided.
  • Description/Hint: For duzzits run interactively (e.g. widget), this description is provided next to the input field.
  • Render on form as: Rendering on a form is largely determined by data type. True/False is rendered as a number, XML as a textarea, etc. A text input may be rendered as either a text box or a textarea depending upon this configuration.
  • Make this input required: If checked, the duzzit will require that a value is provided for the input. By default this is checked.
  • Don’t show this field on the form: If checked, the input will not be shown. Coupled with setting a default, this allows the duzzit builder to specify an input that will be used for all invocations of the duzzit.
  • Order: You can optionally define a numeric order for your inputs. They will be listed in the editor in this order, and displayed to the user (e.g. widget) in this order.

Comments are closed.