Page tree

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

Compare with Current View Page History

« Previous Version 103 Next »

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.


The ConfiForms Plugin

The ConfiForms Plugin uses Confluence's page permissions to control form use. Users with 'edit' permission for a page have administrative rights for the form(s) defined on that page. By restricting 'edit' rights to the page, the administrator controls administrative rights to its form(s).

Each record stored with ConfiForms has an owner. This means that a user who owns the record can fully control it (if edit/delete is enabled by the administrator). Admin users of a form can configure ConfiForms records to be owned by themselves, and also by other users. A form's administrative users can control all records saved by the form.

A form can define additional users as form administrators or form superusers (even if they don't have edit permissions on the page). 

Each record in ConfiForms has the following associated metadata:

  • id - record internal id (UUID), unique for every saved record within dataset
  • ownedBy - the username of the user who owns the record (and can fully control it)
  • ownedByName - the full name of the user who owns the recordUse ownedBy.fullName
  • createdBy - the username of the user who has created the record (admin users can create records for other users)
  • createdByName - the full name of the user who has created the record Use createdBy.fullName
  • created - the timestamp when the record was created
  • dateCreatedFormatted - a more readable way to see created timestamp (Uses "yyyy-MM-dd HH:mm" format, if you need "created" date in another format, use Virtual functions, created.formatDate(PATTERN) to get it in the format you want)



ownedBy and createdBy are now User objects and you can access all user object properties! See here: Accessing field values and properties


All these metadata fields, in addition to the form's defined fields (definitions), can be referenced using the "ConfiForms Field macro" in these ConfiForms macros:

  • TableView macro
  • ListView macro
  • CardView macro
  • CalendarView macro
  • PlainView macro - when you need just values from ConfiForms and want to construct you tables/HTML widgets yourself (to be used in conjunction with HTML macro, for example; and using [entry.FIELD_NAME] notation to reference field values )
  • CleanView - similar to ListView, with less capabilities but with a lot cleaner HTML generated. Useful for designing own macros (with user macros) and mising it with HTML and other macros. Supports macros insides it's body
  • ValueView macro - is self contained and shows the field value directly (no need to use "ConfiForms Field macro")

Also there is a "IFMatches" macro which can be used inside CalendarView and ListView to enable showing/hiding blocks of content based on the ConfiForms field values


Take a look at this page which demonstrates how the data can be shown: Multiple ways to show your form data in Confluence with ConfiForms


Our Backlog

ConfiForms Backlog



Quick tips

  • Each form has a name and belongs to a page. Use the form's name and the Confluence page where the form is configured to reference a ConfiForms Form
  • To define the form, use the ConfiForms Form and Field Definition macros
  • To  enable registrations  and display the formuse the ConfiForms Registration Control macro
  • To display the form with its own layout , use the ConfiForms Registration Control  macro body as a container for the form's design, placing ConfiForms Field  macros in the container that define the form's fields
  • To enable data edits use ConfiForms Edit Controls with  ConfiForms TableView, ListViewCalendarView or CardView macros  
  • To add convenient viewer to your data use ConfiForms Entity Viewer with  ConfiForms TableView, ListViewCalendarView or CardView macro  
  • To send email from ConfiForm, use an IFTTT macro placed inside the ConfiForms Form macro
  • To display saved data, use the ConfiForms TableView, ListView, CalendarView, CardView or ValueView macro
  • To customize the output , use the CSS rules for ConfiForms Fields macro
  • To configure dependent fields and relations between fields, use the ConfiForms Field Definition Rules macro 
  • To aggregate and merge the data from different ConfiForms Forms, use the ConfiForms TableView Merger macro

Macro documentation

ConfiForms Form (Definition)

confiform

The main macro to define the entry form and its rules

ConfiForms Form nameformNameThe name of the form being created. This name be unique within the page and use alphanumeric characters [a-z, 0-9].
Registration form titleregistrationFormTitleThe title for the form to be displayed in the registration dialog.
Save button labelsaveButtonLabelThe text to display on the 'Save' button in the registration dialog.
Close button labelcloseButtonLabelThe text to display on the 'Close' button in the registration dialog.
Print button labelprintButtonLabelThe text to display on the 'Print' button in the registration dialog.
Enable full audit (DEPRICATED)enableAuditIf set, this enables a full audit, tracking all the changes made to the form and enabling a change history for versioning purposes. The form's admin users are able to see the log as a part of the admin user interface.
Secure storagesecureStorageWhen set, if a form has fields of type file then additional subpages with restricted access will be created to hold those files (as page attachments) and enable secure access. Form admins and a record original creator will have access to these attachments for download
Lock formlockedUse this flag when the ConfiForm should be locked so that additional records cannot be stored.  Admin users will still be able to manage the form's data.
Lock messagelockedMessageThe message text that will be displayed to users when the form is locked.
Enforce one entry per useruniqueByUserConfiForms will ensure that only one record per user (ownedBy) is saved.
Enforce one entry per user messageuniqueByUserMessageMessage text to show when a user attempts to register more than one entry and 'One entry per user is enforced'.
Restrict record view for non-admin usersshowOnlyOwnRecordsThis parameter limits access for non-admin users so that only records owned by the user will be visible to this user. Admin users will still have access to all records.
Read-only after registrationreadonlyAfterRegistrationThis sets the form to be read-only once the user has submitted it. Users who have not yet submitted the form will still be able to do so.
Read-only messagereadonlyAfterRegistrationMessageWhen the 'Read-only after registration' parameter is set and the user has submitted the form, this text will be displayed.
Track maximum capacity (records number)maxCapacityThe maximum number of records that ConfiForms will allow to be submitted.
Maximum capacity messagemaxCapacityMessageWhen the 'Track maximum capacity' flag is set and the maximum number of records has been reached, this text will be displayed.
Allow data export and enable searchexportUse this parameter to enable data export for non-admin users.  The "Enable export" parameter on the TableView macro must also be set. This also enables form's data to be searchable via Confluence search.
Enable form's ''Print'' buttonprintEnabledThis parameter will enable a print button on the form.
Show editable fields in Print viewprintEditableWhen this parameter is set, the form's fields will be displayed as editable entries in the Print view.  When not set, the fields will be shown as read-only labels.
Additional form admin user names (or groups)additionalFormAdminsA comma-separated list of user names / user groups that should be treated as the form's administrators.  This parameter can be used to lock the form's configuration but enable full control over the form's data to certain users.
Anonymous formanonymousInputEnabling anonymous input for your form will allow you to create records anonymously (createBy and ownedBy fields are not set. Records could be modified only by Form admins)
Disable page re-indexdisablePageIndexWhen checked, the page with ConfiForms Form will not be reindexed (for search) on every entry modification.
Allow data reads for a user with no read access allowReadsWhen set, the data stored with ConfiForms on this page will be accessible by a user even if a user does not have view permissions on the page
Enable form autocompleteautocompleteUses browser based autocomplete feature for field values
Enable form debug modedebugModeWhen you have IFTTTs in your form and you want to see the execution log and order. Please be aware that you need to enable the logging as described here as well
ConfiForms Field Definition

confiform-field-definition

The macro to use inside the ConfiForms Form macro to define the form's fields, their types, and behaviour.

Field namefieldNameA required parameter which allows alphanumeric values; the name must be unique within the confluence page.
LabelfieldLabelThe label to be shown with a form element (for example, the caption for a button, the title for input fields, or the header when used in a ConfiForms Field in TableView or CardView).
RequiredrequiredIf this parameter is set, ConfiForms will ensure the field has a value and validate the user's input.






Field type

type

The field's type which defines how data can be entered in the field (datepickers for dates, dropdowns, etc.) according to these definitions:

TypeCompatibilityDescription
Text 4.3+A simple text input field.
Action Button4.3+Action button to update the entry when in "view mode". Easy to implement quick notifications when used together with IFTTT module
Attachments Picker5.1+Convenient way for connecting ConfiForms records with attachments (stored either on the same page or on a configured page)
Autolink 4.3+This type creates automatic links to resources based on a defined pattern. When used with an IFTTT macro to create pages, autolinks can reference the record owner as [owner]; the record modifier, as [modifier]; and any record field as [entry.FIELD_NAME] (except entry.id , which is not available when a record is about to be created)
Autonumber 4.3+

This type makes the field's value an auto-incremented number assigned automatically to each record. You can control how the number is displayed by using a mask (prefix) and an initial number. See Text masks and masked input. 


On highly concurrent systems you might see duplicate values for the autonumber (Duplicate values for internal recordId field,  in fact) 


ConfiForms does not guarantee uniqueness. 


To fix the issue please use the following service method on your form to remove duplicates (duplicates will get new IDs)

[YOUR_CONFLUENCE_SERVER_URL]/ajax/confiforms/rest/fix-storage.action?formName=<FORM_NAME>&pageId=<PAGE_ID>

See more on Release Notes#Version2.0.15

Autopage 4.3+This field type records the source page where the record was submitted.
Calculated4.3+This type sets the value for the field based on an expression which can reference record owner as [owner]; record modifier, as [modifier]; any record field as [entry.FIELD_NAME]. Important: the value is calculated only when an entry is created. See the "Formula" field type for a field which is recalculated on each edit. See Supported math operators, formulas and functions.
Captcha5.1+Captcha field to prevent and fight "spam" and auto-submits
Checkbox 4.3+Display the field as a checkbox.
Checkbox group 4.3+Displays the field's options as a group of checkboxes.
Comment5.1+

A field to hold multiple comments (can be also enabled with anonymous user commenting on your record)

Comments are READONLY. You or your users, can only append new comments to the record.

Editing the ConfiForms record with a comment field and saving it will APPEND the comment typed to the list of existing comments for this record

Confluence Multilabel5.1+Provides a list of Confluence labels to pick from
Currency5.0+A field to represent money, with currency symbol and in a desired format
Date 5.0+This type provides a datepicker that stores data in the format specified in Confluence's general settings for Date Format.
Datetime 5.0+A datepicker with time control to store data in the format specified in Confluence's general settings for Date Time Format.
Datetime interval5.0+Datepicker which enables you to select 2 dates, start and end, could be used on CalendarView to show time periods / events
DB Dropdown5.1+Same as simple dropdown, but backed up by the resultset from your database query. Your query must return 2 columns where first will be taken as ID and second will be used as field label
DB Dropdown (advanced)5.1+Same as advanced dropdown but backed by database rows
DB Multi-select5.1+Same as simple multi-select, but backed up by the resultset from your database query. Your query must return 2 columns where first will be taken as ID and second will be used as field label
DB Checkbox5.1+Same as simple checkbox, but backed up by the resultset from your database query. Your query must return 2 columns where first will be taken as ID and second will be used as field label
DB Radio group5.1+Same as simple radio group, but backed up by the resultset from your database query. Your query must return 2 columns where first will be taken as ID and second will be used as field label
DB Smart Classifier5.1+Same as Smart classifier but backed up by YOUR database (available since version 1.24)
Database-backed row referencing field5.0+Allows you to link a database record to the particular field / record in ConfiForms. As this is a "rich field" it means you can access through this field any linked data from your database record
Drawing canvas  4.3+A field type for capturing simple drawings such as 'wet signatures,' for example.
Dropdown 4.3+This field type creates a drop-down list (or combobox) for capturing user input.
Dropdown (advanced)5.1+A dropdown with a filtering field to make lookups. Useful with large number of choices
Dynamic label5.1+This controls behaves similarly to Confluence labels, and allows setting multiple labels to one field. List of labels could be dynamic and you can even set it to reference itself, meaning that when a new label is entered in current form it will be immediately available for lookup
Dynamic Dropdown (auto-suggest field)4.3+This one offers a dynamic drop-down list (or combobox) in which the values can be pre-defined or referenced from another form; it includes an option for users to enter their own values.
Dynamic Dropdown (auto-suggest field) - Database5.1+Dynamic dropdown field with the choices served from a database query. Make sure you have a column ID in your query, and it is unique - this will be used as identifier and stored in ConfiForms for later lookups. You can have multiple columns returned. All values then can be referenced through this field and shown in ConfiForms views. Second column will be used as a label for a dropdown choice
Dynamic Dropdown (auto-suggest field) - Webservice5.1+Dynamic dropdown field with the choices served from a database query. Make sure you have a column ID in your query, and it is unique - this will be used as identifier and stored in ConfiForms for later lookups. You can have multiple columns returned. All values then can be referenced through this field and shown in ConfiForms views. Second column will be used as a label for a dropdown choice
Dynamic Multilabel5.1+This controls behaves similarly to Confluence labels, and allows setting multiple labels to one field. List of labels could be dynamic and you can even set it to reference itself, meaning that when a new label is entered in current form it will be immediately available for lookup
Enroll button 5.0+This field type enables one-click record storage.
File 4.3+This type provides a way to upload files and images. Uploads will be stored as attachments on the page where the ConfiForms form is defined.
Formula4.3+This field type sets the value for the field based on an expression which can reference the record owner as [owner], a record modifier as [modifier]; and any record field as [entry.FIELD_NAME]. Important: this value is calculated every time an entry is updated (and created). See the "Calculated" type if the field should NOT recalculated on each edit. See Supported math operators, formulas and functions.
Html4.3+raw HTML content
Hidden 4.3+This type provides for a concealed constant value to be stored with the record.
Hidden Html4.3+Hidden raw HTML content
Insight object 5.1+Integrations with Riada Insight plugin to reference Insight object and bring access to all it's properties
Insight object (multiselect) 5.1+Same as above, but allows you to reference multiple objects in one ConfiForms field
Insight objects dropdown 5.1+Provides you with capability to build a dropdown over the Insight's types and objects
IP Address tracking5.1+Hidden field to track user's IP address and save it together with form entry data
Iranian Calendar5.1+Shows Iranian calendar as a data/datetime field control. There are Virtual functions to convert the data between the calendars
Information panel (readonly)5.1+Similar to "Section" field - this field is not stored in the dataset but used for informational purposes. Can be of 3 types: info, warning and error. Intended use case is to use together with ConfiForms Field Definition Rules to show the field on the form conditionally, based on the values in other fields, to help/guide the users better while they fill in your forms
Link 4.3+This field type offers a convenient way to store links to other resources and display them as links.
Markdown editor 5.1+

Allows you to have contents in a field in a markdown and Atlassian markup (2 options).

Value is rendered as HTML when in "view".

Masked Text4.3+This type provides a way to mask (or constrain the format of characters entered) in a text field.  For example, a mask of 00/00/0000 will format the entry in this way: 23/12/2014.  See Text masks and masked input to learn more about defining a mask.
Multi-select 5.1+This type stores multiple values for the field.
Numeric4.3+Same as text field but is converted to number when used in sorting/ordering
Numeric hidden4.3+Same as numeric but hidden (useful when calculations and later filtering should be applied over the datasets)
JIRA issue4.3+

This field type provides a means to reference a JIRA issue. It requires an application link between Confluence and JIRA.

When issue by key is found you can access some of it's properties:

Property
key
title
description
status
link
  • title can be accessed via name "summary" as well


See more details on Accessing field values and properties

From ConfiForms version 1.30 - you can access ANY property of the JSON returned by JIRA

The syntax is as described in detail here: Using Field Definition Rule to request data from JIRA and set it to ConfiForms fields

The tutorial is for Field rules, but the idea and the concept on how to access the data returned by JIRA is the same



JIRA issues (multi-select)5.1+

Allows you to reference multiple JIRA issues with one ConfiForms field

You can access any property from the referenced JIRA issue. Before doing so you need to convert a field to JIRA issue object internally, using Virtual functions called asJIRAIssue

For example:

asJIRAIssue.title

Will print a title for each JIRA issue referenced with this field

JIRA JQL5.1+Expects you to put a valid JQL, which will be executed for you and a number of matching issues will be shown (together with the link to JIRA search)
Page/Blog post 4.3+This type permits the field to reference a Confluence page or blog post.
Page/Blog post (multi-select)5.1+

Allows you to reference multiple pages in one ConfiForms field.

Before accessing properties of the referenced pages you will need to use virtual function called asPage to transform field values to a Page object

Password 5.0+A type for passwords which obscures the characters being entered.
Radio group 4.3+

This type provides for a group of radio buttons, which allow the user to choose a single exclusive option.  This type can be especially useful with surveys.

Readonly4.3+Looks like a text field but is readonly to the user, might have a default value. Usually used with ConfiForms Field Definition Rules which set's value to this field
Section 4.3+This is a section placeholder to separate fields into groups on the form.
Security group 5.1+

Field lists security groups available in your Confluence to pick from

You can restrict the groups in the list if necessary

Security group (multi) 5.1+Same as above, but allows multiple security groups to be associated with a field
Simple date 4.3+This type offers 3-part drop-down lest (year, month, and day) for easy date selection.
Smart classifier 4.3+This sophisticated field type allows users to enter data based on a stored structured dataset and the deep structure can be defined as needed.

Smart Dropdown

Smart Dropdown (advanced)

Smart Multiselect

Smart Radio buttons

Smart Checkbox

4.3+


5.1+


5.1+


5.1+


5.1+

These types provide ways to reference the data from other ConfiForm forms, either another form's drop-down values, or records stored directly (see the flag 'Reference to values').
Status 5.0+

This field type permits easy grouping and presentation for entered data. Each status level is color-coded to foreground data groupings.

Important

Filtering by the status field can be a bit complex because each color has a constant value which is stored with the data according to this pattern:

ColorConstant
DEFAULT
default
ERROR
error
CURRENT
current
SUCCESS
success
COMPLETE
complete
MOVED
moved

However, as the status field is actually a dropdown with values, the texts you specify for dropddown choices is accessible thought the "label" property.

mystatusfield.label:My Text for label


See Accessing field values and properties

Time5.1+Field to store time
Timestamp5.1+Field to store a timestamp (in epoch format)
Textarea 4.3+This type provides a textarea for user input.
User 4.3+This field type enables reference to users in the Confluence system.  Entering initial letters of a username will automatically provide a list of suggested users.
User (multiselect) 5.1+Like the User type, this one allows selection of multiple users.
Voting control5.0+Enables quick voting control (renders as a button in "view mode" and rendered as "user picker" in "edit mode")
Version5.1+Enables "versionable" record. This means the data will be checked before saving if it has been changed in between

Webservice-backed object referencing field

Webservice dropdown

Webservice dropdown (advanced)

Webservice multi-select

Webservice checkbox

Webservice radio group

5.1+

Groups of fields, similar to smart/db fields, but enabling you to connect to web services and show the data from webservices in ConfiForms fields

For example to show components from Jira - Building a dropdown field in ConfiForms backed by webservice call to Jira Rest API - createmeta


WYSIWYG 5.0+ (on 4.3 this controls is shown as textarea)This field type provides a simple editor that supports basic formatting styles.

* The Compatibility column shows the Confluence version number with which this field type is compatible.


Please be aware that since 2.4, ConfiForms is compatible with Confluence versions 6.0+

Compatibility shown here for the field types is for historical reasons only.

Check out the Accessing field values and properties document which explains how to use each field type in "views", to show the data


Field descriptionfieldDescriptionThis parameter provides a caption text for the field that is visible below the field.
VisibilityrestrictionsUse this parameter to limit a field's visibility to selected users or groups.  It accepts a comma-separated list of group and users and can be left blank if there are no restrictions.
EditabilityeditRestrictionsLike the Visibility parameter, this one limits who can edit the field, again using a comma-separated list of group or user names; can also be left blank if there are no restrictions.
CSS stylescssThis parameter can contain the CSS rules that should be applied to the field's input.  Adjust the CSS rules on the ConfiForms Field macro to customize the field's output.
Validation rulesvalidationA regular expression to validate the field's input; see detailed documentation at Automatic validation for your fields.
Validation messagevalidationMessageA message to be displayed when validation fails; if this is not specified, a standard message will be shown.
ConfiForms Registration Control

confiform-entry-register

This macro defines how the form is displayed (as a pop-up dialog or embedded in the page) and the form's behaviour when submitted. Multiple 'Registration Controls' that use the same form (form definition) can be placed on one or multiple pages.

When the macro has a body defined, the fields in the body will be used as inputs for the form layout. To enable WYSIWYG mode, make sure that "ConfiForm Field" macros are in the body of the "ConfiForms Registration Control" macro. ConfiForm Field macros and text can be styled as needed.

If the "ConfiForms Registration Control" macro is not defined (empty), a default layout will be used (either as a table or a card with key-value fields).

ConfiForms Form nameformNameThe name of the ConfiForm to which this registration control should be linked. This parameter is required when the macro is used by itself (not inside the ConfiForms Form macro).  The name parameter can be skipped when the macro is configured inside the ConfiForms Form macro, and if not defined, the form name is automatically assigned.
Location page namepageTitleThe name of the page on which the form is defined if not the current one; leave this blank if the form is defined on the same page.
Embedded or Dialog?embeddedCheck this option to have the form embedded on the page, uncheck to display the form as a pop-up dialog.
Use the layout from main 'ConfiForms Registration Control'regControlLayoutWhen set, ConfiForms will try to find the Registration Control from ConfiForms Form macro and will try to use that for rendering the view dialog.
Registration button labelregistrationButtonLabelThe text to be displayed on the dialog opener button (when form is in dialog mode).
Override Form dialog's 'Save' buttonoverrideSaveButtonLabelNow you can override Form's default button caption for saving the records.
Override label for form 'Close' buttonoverrideCloseButtonLabelOverride Form's default button caption for closing the dialog window.
Override label for form 'Print' buttonoverridePrintButtonLabelOverride Form's default button caption for printing.
Post save messageregistrationMessageThe text to be displayed after a record been created.
Confirmation message to show before form submitconfirmationMessageConfirmation message to show before form submit. Leave blank if you don't want to have a confirmation dialog to be shown before form submit.
Key-value request parameterspresetValues

This parameter provides a way to preset values for certain fields in the form.  These are listed as key-value pairs, separated by & (as request parameters) where the ''key'' is a ConfiForms Field name and the ''value'' is the data to be preset for the field.

You can also pre-set some values from a context:

  • [now] - to set current date/time on the date/time field
  • [user.name] - current logged-in username (if anonymous access then "Anonymous" will be set)
  • [user.fullName] - current logged-in user's full name (if anonymous access then "Anonymous" will be set)
  • [user.email] - current logged-in user's email (if anonymous access then "" will be set as email)

use it like key=value, for example mydt=[now]

Also, supports referencing "this" for "user" and "page" fields.

Like

mypage=this

will reference current page (when field "mypage" is of type "page or autopage")

Enable auto enrollautoenrollUse this parameter when the form has preset values (key-value pairs) and can be auto submitted. Because the form can have multiple registration controls, the auto enroll can be combined with predefined data to enable one-click submissions, for example, to capture yes/no feedback.
Valid redirect URLredirectUrlAn optional location to which the user will be redirected after a successful ''save'' operation. This parameter supports parameters and references to record fields: the record owner can be referenced as [owner]; the record modifier as [modifier]; and any record field can be referenced as [entry.FIELD_NAME].
Open redirect URL in a new window/tabredirectUrlOpensInNewOpen redirect URL in a new window/tab
CSS stylescssCSS rules to be applied to the Register button when the form is displayed as a pop-up dialog (when the form is embedded in the page, this button is not shown).
Visible only to groups/usersrestrictionsThis parameter accepts a comma-separated list of groups and users to which this field will be visible. Leave this parameter blank if there are no restrictions.
Hide control when stored data matches this criteriahideIfMatches ALL ConfiForms entries stored by the form referenced will be concealed when the items in this parameter are matched in the entry. The control itself will be hidden when the condition/filter given is met, and this parameter uses the same syntax as in filters .
Reverse criteriareverseReverses condition defined in "Hide control when stored data matches this criteria"
Field errorsreportFieldErrorsErrors will be reported also with a message shown next to the field.
Form heightformHeightForm height (in pixels, number only). Leave blank if you are fine to have an automatic form's height calculation.
Form widthformWidthForm width (in pixels, number only). Leave blank if you are fine to have an automatic form's width calculation.
Execute custom JavaScript function after the form is loadedafterLoadInitPut the name of the JavaScript function you want to execute. You can have 'formId' as parameter in this function to receive form element id. Confluence administrators could disable scripts execution in ConfiForms app settings.
ConfiForms Edit Controls

confiform-entry-edit

This macro defines the behaviour of the Edit control for ConfiForms ListView and TableView.

Inline edit or in dialoginlineDefines how the record edit should be done: through a dialog or inline on the page.
Displays controls in compact modecompactModeIn compact mode ConfiForms edit controls are rendered as a dropdown menu, not buttons.
Display Edit and Delete buttonsshowBothThis parameter can be configured to conceal the 'Delete' action for non-administrative users, or to display both Edit and Delete. To conceal both Edit and Delete, do not define the 'ConfiForms Edit Controls' macro.
Display Copy buttonshowCopyShows "Copy" button, enables easy copying of records / duplication. Disabled by default.
Hide edit buttonhideEditWhen enabled, the "Edit" button will not be shown (for example, when only "Delete" needs to be shown, as a requirement).
Use the layout of Registration Control (from form)regControlLayoutYou can point "Edit controls" macro to reference a Registration Control macro layout (this macro MUST be inside the ConfiForms Form Definition macro body in order for this macro to find it and pick it's layout correctly).
Label for Edit buttoneditButtonLabelThe text to display on the edit button.
Label for Delete buttondeleteButtonLabelThe text to display on the delete button, which is actually a link in the user interface.
Label for Copy buttoncopyButtonLabelThe text to display on the copy button.
Label for Cancel buttoncancelButtonLabelThe text to display on the cancel button.
Post update messageupdateMessageThe text to display after a record has been updated.
Redirect URLredirectUrlYou can specify custom redirect URL to be shown after the 'save' operation completes. Could be constructed dynamically. You can reference record owner as [owner]; record modifier as [modifier]; current user as [user]; any record field as [entry.FIELD_NAME]; you can reference page watchers as [watchers]. You can use @self to stay on current page.
Open redirect URL in a new window/tabredirectUrlOpensInNewOpen redirect URL in a new window/tab.
CSS stylescssCSS rules to be applied on the control (when used inside the table you can specify the width it occupies).
Visible only to groups/usersrestrictionsThis parameter accepts a comma-separated list of groups and users to which this field will be visible. Leave this parameter blank if there are no restrictions.
Hide control when stored data matches this criteriahideIfMatches The current ConfiForms entry stored by the form referenced will be concealed when the items in this parameter are matched in the entry. The control itself will be hidden when the condition/filter given is met, and this parameter uses the same syntax as in filters
Reverse criteriareverseReverses condition defined in "Hide control when stored data matches this criteria".
Form heightformHeightForm height (in pixels, number only). Leave blank if you are fine to have an automatic form's height calculation. Only works for non-inline edit mode.
Form widthformWidthForm width (in pixels, number only). Leave blank if you are fine to have an automatic form's width calculation. Only works for non-inline edit mode.
ConfiForms TableView

confiform-table

The macro to display stored data as a table, with instant search, filtering, and data sorting/ordering.

ConfiForms Form nameformNameThe name of the ConfiForm form that TableView will use.
Form Location pagepageTitleThe name of the page on which the form is defined if not the current one; leave this blank if the form is defined on the same page. You can use @parent to reference a parent page.
FilterfilterThe filter to be applied to the stored dataset; see detailed documentation at ConfiForms Filters and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/Sorting rulessortRules for ordering and sorting the returned dataset; see detailed documentation at Sorting in ConfiForms   and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

Enable instant searchenableSearchThis parameter adds a search input field above the table to enable quick searching and filtering of the stored data.
Enable inline individual editsenableGridEditWhen enabled, a user with sufficient permissions will be able to edit the cell data inline (by double clicking on the table cell holding the value). NOT COMPATIBLE when a view has Edit Controls / Entry Viewer!
Enable support for a filterenableFilterSupportAdds a "DIV" element around the rendered table, so the ConfiForms Filter macro will be able to find it on the page (In some cases you need a pure table to be rendered, as when used inside the chart macro, therefore this setting is set to false by default)
Enable 'Add new record' inline buttonenableInlineAddEnables users to have a button to add records inline (without a need to have to open the form's dialog window).
Caption for 'Add new record' inline buttoninlineAddButtonLabelText caption for 'Add new record' inline button.
PaginationpagerA parameter to enable displaying records in sets (for example, in groups of 1, 25, 50, 100, or 200 per page); if not configured then all stored records are shown.
Override 'Hide if empty' parametershowEmptyValuesOverride 'Hide if empty' parameter on fields and force to show empty values.
Enable exportexportThis parameter provides a way for non-administrative users to download the returned data in CSV, XML, or JSON formats.  While the form's administrative users can always export ConfiForms data with the administrative interface, they should enable data export for non-administrative users with the 'Allow data export' parameter in the ConfiForms form macro.
Comma separated list of fields to exportexportFieldsComma separated list of fields to export. You can put rich properties. When left empty the default list fields list is taken.
Scrollable tableswrappedThis parameter provides scroll bars for larger tables by applying CSS style rules.
When wrapping is enabled you can limit the scrollingenableScrollingWhenWrappedWhen wrapping is enabled you can limit the scrolling. Effective only when wrapping into scrollable container is enabled.
CSS stylescssUse this parameter to customize CSS styling for the table to be generated; to apply a CSS class prefix the ruleset with 'class:'
Striped table renderingwithHighlightingThis parameter enables highlighting alternate rows in a table.
Message to show when dataset is emptymessageToShowWhenEmptyMessage to show when dataset is empty. Leave empty if you do not want to show any message.
Show number of records in the footershowRecordsCountShows number of records in the footer.
Label to use for showing number of recordsshowRecordsCountLabelText for label for showing number of records in the footer.
Merge action buttons into one columnmergeActionButtonsBy default action buttons, as any other fields in ConfiForms use own column to render the output.
Filter IDfilterIdDo not use spaces or umlauts. Mapping between ConfiForms Filter macro and this view, to ensure the correct view is filtered 'Filter ID' parameter must be identical.
ConfiForms ListView

confiform-list

This macro displays your stored data in WYSIWYG view (it also supports filtering and data sorting/ordering).

ConfiForms Form nameformNameThe name of the ConfiForm form TableView should use.
Form Location pagepageTitleThe location of the page on which the form is defined; leave blank if the form is on the same page.
FilterfilterA parameter for selecting records from the dataset; see detailed documentation at ConfiForms Filters   and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/SortingsortSee detailed documentation at Sorting in ConfiForms  and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

Enable instant searchenableSearchThis parameter adds a search input field above the table to enable quick searching and filtering of the stored data.
Enable 'Add new record' inline buttonenableInlineAddEnables users to have a button to add records inline (without a need to have to open the form's dialog window).
Caption for 'Add new record' inline buttoninlineAddButtonLabelText caption for 'Add new record' inline button.
PaginationpagerA parameter to enable displaying records in sets (for example, in groups of 1, 25, 50, 100, or 200 per page); if not configured then all stored records are shown.
Enable inline individual editsinlineEditWhen enabled, a user with sufficient permissions will be able to edit the data inline (by double clicking on the value).
Enable exportexportThis parameter provides a way for non-administrative users to download the returned data in CSV, XML, or JSON formats.  While the form's administrative users can always export ConfiForms data with the administrative interface, they should enable data export for non-administrative users with the 'Allow data export' parameter in the ConfiForms form macro.
Comma separated list of fields to exportexportFieldsComma separated list of fields to export. You can put rich properties. When left empty the default list fields list is taken.
CSS stylescssUse this parameter to customize CSS styling for the table to be generated; to apply a CSS class prefix the ruleset with 'class:'
Message to show when dataset is emptymessageToShowWhenEmptyMessage to show when dataset is empty. Leave empty if you do not want to show any message.
Show number of records in the footershowRecordsCountShows number of records in the footer.
Label to use for showing number of recordsshowRecordsCountLabelText for label for showing number of records in the footer.
Filter IDfilterIdDo not use spaces or umlauts. Mapping between ConfiForms Filter macro and this view, to ensure the correct view is filtered 'Filter ID' parameter must be identical.
ConfiForms PlainView

confiform-plain

This macro displays your stored data in plain view (it also supports filtering and data sorting/ordering).

ConfiForms Form nameformNameThe name of the ConfiForm form TableView should use.
Form Location pagepageTitleThe location of the page on which the form is defined; leave blank if the form is on the same page.
FilterfilterA parameter for selecting records from the dataset; see detailed documentation at ConfiForms Filters   and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/SortingsortSee detailed documentation at Sorting in ConfiForms  and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

Message to show when dataset is emptymessageToShowWhenEmptyMessage to show when dataset is empty.

Enable support for a filter

enableFilterSupportAdds a "DIV" element around the rendered table, so the ConfiForms Filter macro will be able to find it on the page (In some cases you need a pure table to be rendered, as when used inside the chart macro, therefore this setting is set to false by default)
Filter IDfilterIdDo not use spaces or umlauts. Mapping between ConfiForms Filter macro and this view, to ensure the correct view is filtered 'Filter ID' parameter must be identical.
How the contents shall be renderedrenderAsAllows to select how the contents of form will be rendered as default, table, div or data.
ConfiForms CardView

confiform-card

This macro displays your stored data as a vertical table (or card) with instant search, filtering, and data sorting/ordering.

ConfiForms Form nameformNameThe name of the ConfiForm form that CardView should use.
Form Location pagepageTitleA parameter to store the page where the form has been defined; this should be left blank if the form is defined on the same page
FiltersfilterSee detailed documentation at ConfiForms Filters and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/Sorting rulessortSee detailed documentation at Sorting in ConfiForms and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

Instant searchenableSearchAdds a search input field above the table to enable quick search and filtering of stored data.
Enable inline individual editsenableGridEditWhen enabled, a user with sufficient permissions will be able to edit the cell data inline (by double clicking on the table cell holding the value). NOT COMPATIBLE when a view has Edit Controls / Entry Viewer!
Enable support for a filterenableFilterSupportAdds a "DIV" element around the rendered table, so the ConfiForms Filter macro will be able to find it on the page (In some cases you need a pure table to be rendered, as when used inside the chart macro, therefore this setting is set to false by default)
Enable 'Add new record' inline buttonenableInlineAddEnables users to have a button to add records inline (without a need to have to open the form's dialog window).
Caption for 'Add new record' inline buttoninlineAddButtonLabelText caption for 'Add new record' inline button.
PaginationpagerA parameter to enable displaying records in sets (for example, in groups of 1, 25, 50, 100, or 200 per page); if not configured then all stored records are shown.
Override 'Hide if empty' parametershowEmptyValuesOverride 'Hide if empty' parameter on fields and force to show empty values.
Enable exportexportThis parameter provides a way for non-administrative users to download the returned data in CSV, XML, or JSON formats.  While the form's administrative users can always export ConfiForms data with the administrative interface, they should enable data export for non-administrative users with the 'Allow data export' parameter in the ConfiForms form macro.
Comma separated list of fields to exportexportFieldsComma separated list of fields to export. You can put rich properties. When left empty the default list fields list is taken.
Scrollable tableswrappedThis parameter provides scroll bars for larger tables by applying CSS style rules.
When wrapping is enabled you can limit the scrollingenableScrollingWhenWrappedWhen wrapping is enabled you can limit the scrolling. Effective only when wrapping into scrollable container is enabled.
CSS stylescssUse this parameter to customize CSS styling for the table to be generated; to apply a CSS class prefix the ruleset with 'class:'
Message to show when dataset is emptymessageToShowWhenEmptyMessage to show when dataset is empty.
Show number of records in the footershowRecordsCountShows number of records in the footer.
Label to use for showing number of recordsshowRecordsCountLabelText for label for showing number of records in the footer.
Merge action buttons into one columnmergeActionButtonsBy default action buttons, as any other fields in ConfiForms use own column to render the output.
Filter IDfilterIdDo not use spaces or umlauts. Mapping between ConfiForms Filter macro and this view, to ensure the correct view is filtered 'Filter ID' parameter must be identical.
ConfiForms CalendarView

confiform-calendar

This macro displays your stored data in a calendar view.

Name of the field to use as a grouping field fro calendargroupingFieldNameMust be of type Date/Datetime/Datetime interval or field value returns a timestamp
ConfiForms Form nameformNameThe name of the ConfiForm form that CardView should use.
Form Location pagepageTitleA parameter to store the page where the form has been defined; this should be left blank if the form is defined on the same page
FiltersfilterSee detailed documentation at ConfiForms Filters and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/Sorting rulessortSee detailed documentation at Sorting in ConfiForms and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

PaginationpagerA parameter to enable displaying records in sets (for example, in groups of 1, 25, 50, 100, or 200 per page); if not configured then all stored records are shown.
CSS stylescssUse this parameter to customize CSS styling for the table to be generated; to apply a CSS class prefix the ruleset with 'class:'
ConfiForms Field name to use as calendar event titleeventTitleFieldNameValue of this field will be used as calendar event title in the Calendar view (as always, you can use [entry.FIELD_NAME] notation to reference field values). When left empty, ConfiForms will try to figure out it for you automatically based on the CalendarView macro body.
Calendar panel titlepanelTitleHeader text to show on the calendar entries panel.
Default datedefaultDateYou can override the initial date (day and month) in the CalendarView. Expects the date in ISO8601 format. Example: 2016-02-21
Body placementplacementLeft, Right, Calendar only, dialog
View mode for calendarviewModeMonth, Week, Day
Next day threshold in month viewnextDayThresholdWhen month view is shown, and the event has an end date set, the calendar will span the event to next day if event's time is after this threshold
Weekday from which to start calendardayOfWeekStartBy default, user locale settings are taken. 
Show detailed view on click in read-only modereadonlyViewOnClickBy default events are shown in edit mode, if a user has enough permissions to edit a particular record.
Disable showing 'detailed view on event click'disableViewOnClickWhen checked the detailed view will not be shown.
Show delete button on detailed viewviewAndDeleteOnClickShows the 'Delete' button on detailed view.
Label for delete buttonviewAndDeleteOnClickLabelCaption text for 'Delete' button. 
Filter IDfilterIdDo not use spaces or umlauts. Mapping between ConfiForms Filter macro and this view, to ensure the correct view is filtered 'Filter ID' parameter must be identical.


ConfiForms ValueView

confiform-value

This macro displays your stored data in a simple field view

ConfiForms Form nameformNameThe name of the ConfiForm form that CardView should use.
Form Location pagepageTitleA parameter to store the page where the form has been defined; this should be left blank if the form is defined on the same page
Field name or expression*fieldNameName of the field defined on the form or context field, or an expression, like [count] (and variants) or [total]. Also you can use virtual functions here.
FiltersfilterSee detailed documentation at ConfiForms Filters and/or in the tutorials.
Distinct filterdistinctApply distinct filter to return only unique records. Field names as comma separated list to be used as a key for applying distinct filter.
Ordering/Sorting rulessortSee detailed documentation at Sorting in ConfiForms and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank. The same thing could be done using the filter and adding LIMIT n to the end of the filter.

Field labelwithLabelThe label from the ConfiForms field definition will be added as message before the field value.
Override output formatoverrideFormatYou can specify you own format to be used when field value is shown - expects Java Number Format pattern. See some examples in Virtual functions (formatting currency and formatting number)
Hide if  emptyhideIfEmptyUse this parameter in order to conceal a field when its stored value is blank
Hide field when stored data (for given record) matches this criteriahideIfMatchesSame syntax expected as in filters.
Reverse criteriareverseReverses condition defined in "Hide control when stored data matches this criteria".
Enable inline individual editsinlineEditWhen enabled, a user with sufficient permissions will be able to edit the data inline (by double clicking on the value).
Output field value in a raw formatshowRawYou can use virtual functions here to prepare the raw value according to your requirements.
CSS stylescssUse this parameter to customize CSS styling for the table to be generated; to apply a CSS class prefix the ruleset with 'class:'
Message to show then field value is emptymessageToShowWhenEmptyDefault message to show when field value is empty
Message to show when filter matches no resultsvalueToShowWhenEmptyLeave blank if nothing shall be shown when the filter matches no results
Output typeoutput-typeINLINE or BLOCK
ConfiForms Form Field

confiform-field

This macro defines a field to be displayed within the ConfiForms TableView, ListView, or CardView macros

Field namefieldNameThe name of the field defined on the form referenced. The macro's preview mode displays the field names stored within the form. The ConfiForm metadata fields are available always as well (see above).
Field labelwithLabelThe label from the ConfiForms field definition will be added as a prefix before the field value.
Override field label defaultsoverrideLabelWhen left empty the label for the field is taken from ConfiForms Field Definition for this field, here you can override it
Override output formatoverrideFormatYou can specify you own format to be used when field value is shown - expects Java Number Format pattern. See some examples in Virtual functions (formatting currency and formatting number)
Apply filter on choicesfilterRelevant only for dropdown fields (single or multi-select (simple, smart, db)). Filter is applied on the dataset this field is connected to (in case of smart/db fields). Same as in 'Apply filter' rule.
Show label on own lineshowLabelOnOwnLineTo be used when 'Show value with label' is set to true and you need a label to be placed on own line.
Hide if  emptyhideIfEmptyUse this parameter in order to conceal a field when its stored value is blank, as in ListView or CardView, for example.
Hide field when stored data (for given record) matches this criteriahideIfMatchesSame syntax expected as in filters.
Reverse criteriareverseReverses condition defined in "Hide control when stored data matches this criteria".
Do not show description with the fielddontShowDescriptionThis is sometimes needed when you are building your very own layout for the form and want to control just about everything.
CSS stylescssThis parameter provides a way to apply CSS styles (for example: color:red; border:1px) to the field. Styles will be applied on stored values on output.
Disable inline editdisableInlineEditYou can disable inline edits for this particular field when inline edits are enabled for the whole view.
Message to show when a field value is emptymessageToShowWhenEmptyDefault value to show when field value is empty.
Output typeoutput-typeINLINE or BLOCK
ConfiForms IFTTT Integration Rules 

confiform-ifttt

 This macro defines the integration rules for ConfiForms forms and is to be placed inside ConfiForms Form macro body. The macro body is used as the message body, task content, javascript snippet, page content, or request content, depending on the action type selected.

The macro body completely supports referencing records, including the record owner as [owner], the record modifier as [modifier], and any record field as [entry.FIELD_NAME]. The body can include complex types; see "Subject for email / title for page / url for request" below for details.

You can also reference existing Confluence templates to be used when IFTTT is used to create Confluence pages. To reference a template you will nee to add the following:

[template.YOUR_TEMPLATE_NAME]

The template is looked up by the name, and first in Confluence space templates and then in global templates. If found the content is added to IFTTT macro body and used as a page template


Eventevent
  • onCreated - when a new record is created
  • onModified - when a record is modified
  • onDeleted - when a record is deleted
Action to be performedaction




 

Looking for CLOUD documentation?  This page has information for both versions

 

ConfiForms IFTTT macro is a powerful tool which helps you to built integrations with other systems: to send emails, to create issues in Jira, to build workflows in Confluence, to organise templates and rules. And also to create various types of cool things around ConfiForms and Confluence.

Important note: IFTTT operations in ConfiForms are NOT TRANSACTIONAL, this means that the ConfiForms record save operation and the following after that IFTTT actions will be executed in own transactions. Failure of IFTTT action will NOT result in save operation rollback and the record still will be created

All the IFTTT integration operations are not transactional and executed in own scope, independently from ConfiForms internal operations


ConfiForms IFTTT macro is a part of ConfiForms Form definition and must be placed inside the ConfiForms Form macro body. You can place as many ConfiForms IFTTT macros as you want. Each macro has an event it is binded to. There are 4 types of events in ConfiForms:

  • onCreated - fires AFTER the record is created
  • onModified - fires AFTER the record has been modified
  • onDeleted - fires AFTER the record has been deleted
  • onError - fires in case if any of the previously executed IFTTT rules failed  / resulted in an error


You can define the "condition", to limit the scope when action is fired. Meaning that you can define to execute an action only when certain condition is met.

Conditions macro parameter expects a filter, more about filters could be found here: ConfiForms Filters


ConfiForms IFTTTs generate results (type depends on the IFTTT type)

These results could be used to created "chained" flows, when one IFTTT uses the results of the previous IFTTT(s). The easiest way is to set the name to the IFTTT result (see RESULTNAME), so you can reference it anytime via [iftttResult_RESULTNAME

Important to note that result chaining is PER EVENT. Which means you can reference results of previous IFTTTs only if the event is matching (onCreated, onModified, onDeleted and onError). Each event has own chain of results. 


At the moment ConfiForms IFTTT macro has 38 action types to choose from.


Each action has different set of parameters to set. In most cases you can use references to your entry fields via [entry.FIELD_NAME] in macro parameters, so these will be replaced with actual values.


Important

The execution order for actions is the same as you put them inside the ConfiForms Form macro body (obviously, filtered by event type). IFTTT execution also supports referencing of results for previous execution: Advanced integrations with IFTTT macros with ConfiForms


Below, you can find a list of integrations scenarios the macro can support and it's configuration details

Actions list

There are 38 different actions supported by IFTTT out-of-the-box (some actions are very generic, so the integration scenarios number is a lot bigger)



Each IFTTT action has own parameters, but the following parameters are supported by all actions


When specified (in the docs below, for an action) - a macro body is used as a template, otherwise leave it empty



Parameter nameDescription
Event

Type of event in ConfiForms this IFTTT action should be fired on

  • On Created
  • On Modified
  • On Deleted


Action to performOne of the actions to perform. See the list above
Do not report errorA checkbox field to disable error reporting and continue with the workflow even if current macro has resulted in an error
Custom name for the action result

This is used in advanced techniques, when you want to use the result of the IFTTT in next IFTTT or want to save the result of some IFTTT or some part of the result back into a ConfiForms record. See below the result types and the contents stored in the result for each IFTTT action.


A result (depending on the action type) is stored in the context in the variable prefixed by "iftttResult_"

And is accessible using the Velocity notation via

${iftttResult_RESULTNAME}
or (see Velocity templates syntax for more on "!" operator)
$!{iftttResult_RESULTNAME}

Same can be archived with 
[iftttResult_RESULTNAME]
since ConfiForms version 2.11

Where "RESULTNAME" is the value given in this macro parameter.

Some results hold rich objects. See "Result type" section for exact IFTTT action below


Add Attachment Label

SERVER/DC


Add a label or labels to attachment
Result type:
NO RESULT



Add Page Label

SERVER/DC

CLOUD

Adds label to a page, you can apply a label (or labels) to page sub-pages as well

Result type:
NO RESULT

Add Page Watcher

SERVER/DC

CLOUD

Adds a user or group of users as a page watcher
Result type:

Page object (page where the watcher's were added)

Depending on the IFTTT result name you can access all of the properties available from Page object.

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}

Same can be archived with 
[iftttResult_RESULTNAME.id]
[iftttResult_RESULTNAME.spaceKey]
[iftttResult_RESULTNAME.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provide (any "get" method)

Applink Service

SERVER/DC


Sends a request to configured Application link service

A user specifies which HTTP method to use, which URL service to execute (url must be given as "relative" url, this means it is "concatenated" with the base url in your applink service)

More about Application links in Confluence could be found here: https://confluence.atlassian.com/display/APPLINKS/Application+Links+Documentation

Result type:

Response returned from a request to a service is returned and stored as result

If response is a JSON then you can apply Virtual functions to work on a JSON object

Please note that virtual functions could be applied only on ConfiForms fields, not the IFTTT result directly. This means you will need to save the response to some ConfiForms field temporarily in order to apply the functions and convert the response to JSON.

Audit

Nothing to configure: see Using new Audit IFTTT action

SERVER/DC

Automatic audit for your form. Audit form with <form_name>_log is created for you automatically, with a field referencing your <form_name>
Result type:
NO RESULT

Copy Attachment

SERVER/DC

CLOUD

Copies attachment from one page to another. In contrast to "Move Attachment" action, the copy of an attachment created. Original attachment stays untouched
Result type:
NO RESULT

Copy ConfiForms Data



SERVER/DC

CLOUD

Copies data from one ConfiForms form to another, can have custom mapping for fields and have a filter applied before copying the data

Also, it can "flatten" the multi-select values to copy the data to a new form in an "expanded" view


Please note that if you leave the filter empty then ALL the records from a source form will be copied to a destination form.

To copy just one, current record, you will need to apply the following filter

id:[entry.id]

It is important to note that this action never fires any other "Create ConfiForms Entry", "Delete ConfiForms Entry" or "Copy ConfiForms Data" for the entry created

Usage is very similar to what is shown here but allows you to copy multiple records at a time if necessary

Result type:

Last created (copied) record as object. This means that you can access any property available in ConfiForms record. Please note that the values accessed using the Velocity notation (${}) return "raw" (internal)

values. More on this Accessing field values and properties

Copy ConfiForms Data to DB



SERVER/DC

Executes a SQL statement you specify on your database (on the database connection you have configured)

You must specify a valid SQL statement - either INSERT or UPDATE

Similar to "Copy ConfiForms Data" action you can filter records on original form before copying, as well as "flatten" records in order to have multi-value fields as separate rows (if necessary)


ConfiForms uses JDBC driver to connect to your database. See more on Some guidelines on using database fields in ConfiForms and Working with database fields in ConfiForms

Result type:
NO RESULT

Copy Page



SERVER/DC

Copies page from one location to another

A user performing an operation should have enough permissions (to copy the page from source location to destination location (create page permission))

Please note that the page title and the contents of the copied page will be processed against the current record field's - so if your page title contains the [entry.field_name] notation then these will be evaluated against the values in the current record in the context

You can switch off the processing for the page body, but page title is always processed

Result type:

Copied page as object. Any property a Page object has

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}
...

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provides (any "get" method)




Create Attachment



SERVER/DC

CLOUD

Creates a file, based on the content you specify in macro body and uploads it as attachment.

See more Creating a file with calendar invitation - ics file in Confluence and sending it via email with ConfiForms

You need to specify field name to use to store the reference to a created attachment - ConfiForms field of type "File" is the preferred field type to store this



Macro body:

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

Result type:
File contents as text into the result

Create BlogPost



 

SERVER/DC

CLOUD

Creates blog post based on the contents in macro body and the title given.

Blog post will be created in a Confluence space specified.

You can apply labels to a created blog post

Macro body:

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:

Created Blog Post - complete object, as https://docs.atlassian.com/confluence/5.8.9/com/atlassian/confluence/pages/BlogPost.html

Example:

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.displayTitle}
other properties from BlogPost object

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

(if result was named "MYRESULT")


Create Comment

SERVER/DC

Creates page comment. Comment contents will be take from IFTTT macro body
Macro body:

Macro body is used as comment template

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull




Result type:
Created comment - complete object properties  https://docs.atlassian.com/atlassian-confluence/6.0.1/com/atlassian/confluence/pages/Comment.html

Create (Update) ConfiForms Entry




SERVER/DC

CLOUD

Creates (or updates) ConfiForms Entry in the specified form

It is important to note that this action never fires any other "Create ConfiForms Entry", "Delete ConfiForms Entry" or "Copy ConfiForms Data" for the entry created

Additionally, you can stop the propagation of the "create/update" events completely.


To update the current ConfiForms record leave the "Reference to form and it's location" empty and in parameters to set specify:

entryId=[entry.id]

To target the current record


You can also have your values be evaluated as expressions and contain Supported math operators, formulas and functions

In this case they should be wrapped in ()

Example:

myfield=(FORMATDATE(NOW()))

myfield=(ZEROIFEMPTY("[entry.anotherfield]"))
Result type:

Created entry object, same as in Copy ConfiForms Data


${iftttResult_MYRESULT.somefield}

Same can be archived with 
[iftttResult_MYRESULT.somefield]
since ConfiForms version 2.11

Where "somefield" is the name of the field in ConfiForms form

More details/examples:

This action helps you to create different types of update rules for your ConfiForms entries. You can create an audit for all changes, you can update entries in other forms or entries in the same form based on chosen criteria

Same action type is used for creating new entries and updating existing and the parameter to indicate that is "entryId"

So, to create record you will specify:

someparam=[entry.somefield]&anotherparam=[entry.another]

But to update existing record you will need to have something like this:

entryId=[entry.id]&someparam=[entry.somefield]&anotherparam=[entry.another]

You can also set constant values, does not have to be a reference to some field value

someparam=MY CONSTANT&anotherparam=[entry.another]

The above example will set "someparam" to constant value of "MY CONSTANT" and "anotherparam" will be set to a value found on the field named "another"


Important bit which is often forgotten is to specify which form and where it is located (form name and pageId), the last parameter in the macro. If this is not specified then nothing is executed, as ConfiForms does not know where this action to be applied


Other tutorials:




Create Insight Object



SERVER/DC

Creates Insight object based on the JSON mapping given

See Creating Jira issue from Confluence with ConfiForms for a tutorial on Creating JIRA issues, the concept behind creating Insight objects is identical


IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Macro body:

JSON mapping wrapped in "No Format" or in "Code" macro to have a raw text

JSON mapping should be of structure specified in Insight REST API https://documentation.riada.se/display/ICV50/Version+1.0+documentation

https://confluence.atlassian.com/servicemanagementserver050/insight-rest-api-documentation-1142253260.html

/rest/insight/1.0/object/create service in particular

Result type:

Created Object ID as text

${iftttResult_MYRESULT}
or (see Velocity templates syntax for more on "!" operator)
$!{iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11

(if result was named "MYRESULT")

If IFTTT macro is set to ignore errors (execute in silent mode, then there might be NO RESULT in the variable, so accessing it with "!", like $!{iftttResult_MYRESULT} is safer)

More details / examples:

You can create Insight Objects from ConfiForms entries. However, this is a bit technical to setup as the integration is done through the JSON document you will need to prepare. See tutorial below for more details and examples. Important: you must have a correctly configured Application link to JIRA

Also, there are some helpers to help you with preparing correct JSON, see Virtual functions

Tutorials:

  • Creating Jira issue from Confluence with ConfiForms (similar concept to creating Insight Objects, but expects a different mapping and uses a different service underneath)

    Definitely use the NoFormat macro to place the JSON mapping inside the IFTTT macro body




Create Jira Issue



SERVER/DC

CLOUD

Creates JIRA issue based on the JSON mapping given using https://docs.atlassian.com/software/jira/docs/api/REST/9.2.0/#api/2/issue-createIssue

See Creating Jira issue from Confluence with ConfiForms

You can add users as watchers to created JIRA issue. Must be a valid user (list of users) given


When you want to add an attachment to JIRA issue from ConfiForms file field - you will need to place the "ConfiForms Field" macro inside the ConfiForms IFTTT macro body. This way, you will tell ConfiForms, in addition to issue creation, to upload the file to JIRA. You can upload multiple files, just by placing additional ConfiForms Field macros referencing other file fields into the macro body

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Macro body:

JSON mapping wrapped in "No Format" or in "Code" macro to have a raw text

JSON mapping should be of structure specified in JIRA REST API - https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue

Result type:

Created issue KEY as text

${iftttResult_MYRESULT}
or (see Velocity templates syntax for more on "!" operator)
$!{iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11

(if result was named "MYRESULT")

If IFTTT macro is set to ignore errors (execute in silent mode, then there might be NO RESULT in the variable, so accessing it with "!", like $!{iftttResult_MYRESULT} is safer)

More details / examples:

You can create JIRA issues from ConfiForms entries. However, this is a bit technical to setup as the integration is done through the JSON document you will need to prepare. See tutorial below for more details and examples. Important: you must have a correctly configured Application link to JIRA

Also, there are some helpers to help you with preparing correct JSON, see Virtual functions

This action type supports uploading files to created JIRA ticket, an example is also available in the same tutorial.

Important to note that currently this action selects a primary app link to JIRA, if you have more than 1 JIRA connected then you will be able to create JIRA issues only in your primary JIRA (the one set as primary in your application links)

Tutorials:




Create Page



SERVER/DC

CLOUD

Creates Confluence page based on the template given (in macro body)

See Creating links in original ConfiForms entry to just created page

Using ConfiForms app as template engine to create pages in Confluence


In Confluence the page title should be unique within a Confluence space.

ConfiForms will create a new version of the page if the page with given title already exists in the Confluence space specified

Important to note is that if you put ConfiForms Field macros inside the IFTTT macro body and this macros will be WITHOUT a "view" macro around them, then a ListView macro with a filter set to current record is created as a wrapper for ALL the content in the IFTTT macro body.

If you want to avoid "auto-wrapping" then you need to make sure that all ConfiForms Field macros you put are within the "view" macro (TableView, ListView, CardView, etc)

In contrast, when you use [entry.fieldname] notations then there is no need to wrap anything in views macros. But in this case the data is static data copied (not referenced) there from ConfiForms

All references (like [entry.filed_name]) inside the IFTTT macro body to ConfiForms fields are evaluated against the current record.

If you have an IFTTT action to create a page with ConfiForms Form and it should have filters or field rules which in the created page should look like [entry.fieldname] you will need to wrap these into a virtual function

asEntryRef(REF_TO_ENTRY)


Example:

[entry.id.asEntryRef(entry.id)]

This will return

[entry.id]

When this is necessary?

The use case is when you use it within an IFTTT or have a ListView which has another ListView inside and you want to prevent ConfiForms from applying the context variables onto the sub-lists


The function can be used with any field type (as long as the field exists) and actually the following constructions are perfectly valid

[entry.id.asEntryRef(entry.somefield)] will return [entry.somefield]
[entry.id.asEntryRef(entry.mytextfield)] will return [entry.mytextfield]
[entry.id.asEntryRef(entry.anotherfield)] will return [entry.anotherfield]
[entry.id.asEntryRef(entry.id)] will return [entry.id]


As you can see we apply the function on the same ID field (exists in every ConfiForms record) and the parameter you give in is the important bit in all this...

So, the parameter (PARAM) you give to asEntryRef is wrapped into the brackets and returned:

[PARAM]


You can also use "_func" pseoudo property of a record as a bridge to "asEntryRef" function when the "id" is not available (assigned)

This is always available

[entry._func.asEntryRef(entry.somefield)] will return [entry.somefield]
[entry._func.asEntryRef(entry.mytextfield)] will return [entry.mytextfield]
[entry._func.asEntryRef(entry.anotherfield)] will return [entry.anotherfield]
[entry._func.asEntryRef(entry.id)] will return [entry.id]


IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull


Macro body:

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:

Page object (page created)

Depending on the IFTTT result name you can access all of the properties available from Page object.

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}
...

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provides (any "get" method)

More details / examples:

You can create a page based on the template in this IFTTT macro body. You can have a template embedded or you can reference Confluence template with

[template.TEMPLATE_NAME]

Templates can reference field values using 

  • [entry.FIELD_NAME] to embed the values statically
  • using ConfiForms Field macro to have a dynamic reference to original form, so when the value is changed in the original form then it will get's changed in the page created


You can set your own root page (also dynamically based on the values in your entries, as usual... by referencing via [entry.FIELD_NAME]), you can enable custom permissions on newly created pages 

Additional tutorials:

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull




Delete Attachment



SERVER/DC

CLOUD

Deletes attachments from Confluence. A user must have enough permissions to delete attachments

Attachment ID could be extracted from a file/attachment field value in ConfiForms as follows - using Virtual functions 

(in case of ONE attachment)

[entry.myattachmentfield.asAttachment.id]

(in case if you field holds links to multiple attachments)

[entry.myattachmentfield.asAttachments.transform(id).asList]


Also, some user handy macro to see attachment IDs Attachments list

Result type:
NO RESULT



Delete ConfiForms Entry



SERVER/DC

CLOUD

Deletes the ConfiForms entries by a given filter


You can automatically delete entries, and this is done by specifying a filter. When you want to delete just a record created then the filter is by id:

id:[entry.id]

Important difference (between Creating and Deleting actions) here is the name of the field used to reference entry ID. In filters you need to specify it as "id" and in field parameters you will need to use "entryId"

So, deleting entries happens by filter, more about filters ConfiForms Filters

You will need also to specify explicitly which form to use and where it is located (pageId). See last parameter in Macro editor for ConfiForms IFTTT macro for this action type


Tutorials:


Result type:
NO RESULT



Delete Page




Deletes the page in Confluence

A user must have enough permissions to delete the page

Result type:

Page object to be deleted

Depending on the IFTTT result name you can access all of the properties available from Page object.

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}
...

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provides (any "get" method)




Force Page Re-index



SERVER/DC

Forces page re-index

Sometimes you want a particular page to be re-indexed when a ConfiForms entry get's created/updated or deleted. This action type helps you to achieve that.

Result type:

Resolved Page object to re-index

Depending on the IFTTT result name you can access all of the properties available from Page object.

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}
...

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provides (any "get" method)

Generate Next Number


(experimental)

SERVER/DC


Generates (based on the filtering criteria) and sets next number on the configured field

On highly concurrent systems this may generate duplicates. We are working on improving this. At the moment this is an experimental functionality

See quick tutorial on this here: Using generate next number IFTTT rule and Using generate next number IFTTT rule to have sequence numbers per day

Result type:

NO RESULT




Move Attachment



SERVER/DC

CLOUD

Moves attachment from one page to another

You should specify the attachment ID to be moved and the page destination it should be moved to. A user must have enough permissions to attach the file to a destination page and enough permissions to read the configured attachment.

Can move multiple attachments in one go, See Virtual functions for "asAttachment" function to see how

Result type:
NO RESULT



Move Page



SERVER/DC

CLOUD

Moves page from one location to another

A user performing an operation should have enough permissions (to move the page from source location to destination location)

Result type:

Moved page as object. Any property a Page object has

For example (when result name is MYRESULT)

${iftttResult_MYRESULT.id}
${iftttResult_MYRESULT.spaceKey}
${iftttResult_MYRESULT.displayTitle}
...

Same can be archived with 
[iftttResult_MYRESULT.id]
[iftttResult_MYRESULT.spaceKey]
[iftttResult_MYRESULT.displayTitle]
since ConfiForms version 2.11

Any other property, which Page object provides (any "get" method)




Redirect to URL



SERVER/DC


Redirects to given URL (server side forward if no timeout is given and if timeout is given then via JavaScript)

You can give timeout in a way: url|timeout

(in milliseconds)

Result type
NO RESULT



Remove Attachment Label



SERVER/DC

Removes a label from attachment or attachments
Result type:
NO RESULT



Remove Page Label



SERVER/DC

CLOUD

Removes page label(s). Silently ignores if a page does not have a requested label to be removed
Result type:

Page object, Any property a Page object  via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}


Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11





Remove Page Edit Restrictions



SERVER/DC

Action to help you to remove page edit restrictions. It is safe to attempt to remove page restrictions for a user, even if this user has no restrictions set
Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11

Remove Page View Restrictions



SERVER/DC

Action to help you to remove page view restrictions. It is safe to attempt to remove page restrictions for a user, even if this user has no restrictions set
Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11

Remove Page Watcher



SERVER/DC

CLOUD

Removes page watcher or watchers from the page

Silently ignores if a page does not have a requested watcher to be removed.

Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11



Rename Page



SERVER/DC

CLOUD

Renames a page

A user performing an operation should have enough permissions to modify the page

Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11



Restrict Page Edit



SERVER/DC

Restricts page edit permissions to certain users / editors
Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11



Restrict Page View



SERVER/DC

Restricts page view permissions to certain users only
Result type:

Page object, Any property a Page object via

${iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>}

Same can be archived with 
[iftttResult_MYRESULT.<PAGE_OBJECT_PROPERTY>]
since ConfiForms version 2.11



Render (execute) macro




SERVER/DC

Renders a contents of it's body and adds the result of a render into a result chain

Result type:

What render macro renders, as string

${iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11



Run JavaScript




SERVER/DC

Executes a JavaScript snippet given in the IFTTT macro body

Code snippet is executed in the "init" block

<script type="text/javascript">
  AJS.toInit(function() {
      ...
      YOUR CODE WILL BE HERE
      ...
  });
</script>

And will be executed on a page load. Administrators could restrict this in ConfiForms general settings!

Macro body:

JSON mapping wrapped in "No Format" or in "Code" macro to have a raw text

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

Result type:

An internal object holding a JavaScript snippet

You can access script value (as text)

${iftttResult_MYRESULT.script}or${iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11

(when IFTTT result is called "MYRESULT")




Send Email



SERVER/DC

CLOUD

Send email to a recipient or a group of recipients

Each email is sent individually

To add ConfiForms file field to an email as attachment - place ConfiForms Field macro into the IFTTT macro body


Email server configured in your Confluence server is used for sending the emails

Emails sent by ConfiForms are NOT queued and sent immediately (to avoid "bulk" message flags, and sent "individual and personal" direct messages)

Macro body:

Is the template to be used to construct an email message body

See more on Sending an email with attachments from Confluence with ConfiForms app

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:

NO RESULT (for versions of ConfiForms prior to 1.39.2)

FROM VERSION 1.39.2

The following properties are supported from version 1.39.2

subject
body
recipientsCount

This means, you can access it with

${iftttResult_MYRESULT.subject}
${iftttResult_MYRESULT.body}
${iftttResult_MYRESULT.recipientsCount}

Same can be archived with 
[iftttResult_MYRESULT.subject]
[iftttResult_MYRESULT.body]
[iftttResult_MYRESULT.recipientsCount]
since ConfiForms version 2.11
More details / examples:

There is a number of tutorials on using this action type:




Send Notification



SERVER/DC

Sends internal notification to a user (or users) in Confluence

Notification will appear in the top-right corner. The message body is configured using the ConfiForms macro body


This action type send internal Confluence notification to the user specified, the notification will be visible in the "workbox", in the right top corner of Confluence toolbar.

Sending this type of notifications is very similar to Sending email, the difference is only in where the notification ends up. And what you can use for notification message body (defined through the ConfiForms IFTTT macro body) - free to use Confluence formatting macros, as they are correctly shown inside the Confluence notifications workbox.

Confluence Notification could be sent only to a registered user (email notification can be sent to any external email address, unless your email server does not support that)

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Macro body:

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:
NO RESULT



Set Page Revision



SERVER/DC

Updates page with a revision information (timestamp and version)

Revision is inserted into the page storage and that increases the page version and generates all related events (page modified event, etc)

This comes handy when you have other plugins that rely on the page versioning and could trigger corresponding actions when it's changes

Macro body:

EMPTY

Result type:
NO RESULT



Update Jira Issue



SERVER/DC

CLOUD

Updates JIRA issue using given JSON object by calling to https://docs.atlassian.com/software/jira/docs/api/REST/9.2.0/#api/2/issue-editIssue

JIRA issue key must be set as macro parameter, could be looked up dynamically from ConfiForms field

It is a wrapper action to ease the setup of updates to JIRA issue from ConfiForms. Same could be achieved with the help of "Applink service" action

IFTTT macro body should hold a JSON structure to update the JIRA issue (use "No Format" macro to construct JSON structure as-is)

Example:

Another example:

See more on JSON structure the "update JIRA issue" API expects

https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/updating-an-issue-via-the-jira-rest-apis


IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull


Macro body:

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:

Issue key as text, accessible directly via result name (for example, if result name is "MYRESULT")

${iftttResult_MYRESULT}
or (see Velocity templates syntax for more on "!" operator)
$!{iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11



Update ConfiForms Entries by Filter



SERVER/DC

CLOUD

Updates ConfiForms entries according to the pattern given by filter


Parameters could be set as expressions (similarly to "Create/Update ConfiForms Entry")

You can also have your values be evaluated as expressions and contain Supported math operators, formulas and functions

In this case they should be wrapped in ()

Example:

myfield=(FORMATDATE(NOW()))

myfield=(ZEROIFEMPTY("[entry.anotherfield]"))
Result type:
NO RESULT



WebService Request



SERVER/DC

CLOUD


Fires a request to a webservice


Some examples on Jira intergation

Macro body:

JSON mapping wrapped in "No Format" or in "Code" macro to have a raw text (when you want to send POST/PUT requests with body)

Template / content to use to generate the contents
You can reference any field value using [entry.fieldname] notation, more on this Accessing field values and properties

IFTTT macro body evaluates as Velocity template
Macro body is evaluated as Velocity Template! This allows you to use #if #end constructions around JSON mapping parts.

Field values are stored in Velocity templates under field names!

For multi-value holding fields and for the single choice fields, like dropdowns, radio group fields, etc the field is always present in the context and has the value, so you cannot check it with 

#if(${somefield})
#end

as it will always be evaluated to true, but you can check if it has any values

--- check if field has no values

#if(${somefield.isEmpty()})
#end

--- check if the field is NOT empty and has values
#if(!${somefield.isEmpty()})
#end

Single choice field

--- get id
#if(${somefield.id})
#end   

--- get label
#if(${somefield.label})
#end


Checking if multi-value field has certain label or id

--- check if field has label (stored in values)
#if(${somefield.hasLabel("some_label")})
#end   

--- check if field has id (stored in values)
#if(${somefield.hasId("some_id")})
#end


Also, there is standard set of objects inside the context

context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object


Since ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", new com.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());


Since ConfiForms version 2.27.3

context.put("null", new NullTool()); // helper tool to check for nulls https://cwiki.apache.org/confluence/display/velocity/NullTool
context.put("esc", new EscapeTool()); // helper tool to escape values https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/EscapeTool.html
context.put("list", new ListTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/ListTool.html
context.put("iter", new IteratorTool()); // helper tool to work on lists https://velocity.apache.org/tools/2.0/apidocs/org/apache/velocity/tools/generic/IteratorTool.html

See Apache velocity tools for detailed documentation on these helper classes


Since ConfiForms version 3.10.0

New class that allows you to query other forms for data right inside your Velocity template

Available under "dataLoader" and allows you to query other forms.
Returns a list of RegEntry (ConfiForms Entry (raw)) instances

  • findByFilter(long pageId, String formName)
  • findByFilter(long pageId, String formName, String filter)
  • findByFilter(long pageId, String formName, String filter, String sortedBy)
  • findById(long pageId, String formName, String id)



Very similar to what is available in the context when you develop Confluence user macros: 
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/                
              
which you can reference as any other variable in Velocity using velocity syntax, for example: ${page.id} to reference page id of current page

Also, a helpful link from apache 
---- copied from Apache https://wiki.apache.org/velocity/CheckingForNull

Q: I want to check for null, something like this:

#if ($car.fuel == null)

A: There are several approaches. Select the one most suitable depending on what you really want to do. (Thanks, everybody, for all the feedback on the user list.) See also: Bugzilla #20999Bugzilla #27741VelocityNullSupport.

Approach 1: Use the fact that null is evaluated as a false conditional. (cf. http://velocity.apache.org/engine/devel/user-guide.html#Conditionals)

#if( ! $car.fuel )
  • Note: The conditional will also pass if the result of $car.fuel is the boolean false. What this approach is actually checking is whether the reference is null or false.

Approach 2: Use the fact that null is evaluated as an empty string in quiet references. (cf. http://velocity.apache.org/engine/devel/user-guide.html#quietreferencenotation)

#if( "$!car.fuel" == "" )
  • Note: The conditional will also pass if the result of $car.fuel is an empty String. What this approach is actually checking is whether the reference is null or empty.

BTW, just checking for empty can be achieved by:

#if( "$car.fuel" == "" )

Approach 3: Combine Approach 1 and 2. This will check for null and null only.

#if ((! $car.fuel) && ("$!car.fuel" == ""))
  • Note: The logic underlying here is that: "(null or false) and (null or > empty-string)" => if true, must be null. This is true because "false and empty-string and not null" is never true. IMHO, this makes the template too complicated to read.

Approach 4: Use a Tool that can check for null (NullTool,ViewNullTool).

#if( $null.isNull($car.fuel) )
  • Note: Of course, NullTool must be in the Context as $null in this case (in ConfiForms it is included into the context under "null" variable name).

In ConfiForms version 2.15.3+ we have extended NullTool to have 2 more convenient methods (isNullOrEmpty and isNotNullOrEmpty) to check if the value is null or empty


isNull
isNullOrEmpty
isNotNull
isNotNullOrEmpty


Approach 5: Don't check for null directly, use a self-explaining method.

#if( $car.fuelEmpty )
  • Note: This is my (Shinobu Kawai's) recommended solution. You have to implement the method, but it makes the template so easy-to-read.


public boolean isFuelEmpty()
{
  // return true if fuel is empty.
}

Approach 6: Use a custom directive. cf. IfNullDirectiveIfNotNullDirective

#ifnull( $car.fuel )
#ifnotnull( $car.fuel )
  • Note: You will have to register the directive in your velocity.properties.


userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

Result type:

Response returned by a call to webservice is accessible directly via result name (for example, if result name is "MYRESULT")

${iftttResult_MYRESULT}

Same can be archived with 
[iftttResult_MYRESULT]
since ConfiForms version 2.11


More documentation and tutorials on ConfiForms IFTTT macro





See more details about each action on this page: Configuring ConfiForms IFTTT actions

Conditionally fire the IFTTT actioncondition

A parameter in which to set the condition for activating the IFTTT action. If this parameter is left empty, the IFTTT action is always executed when the event occurs.  Conditions use the same syntax as in filters, and the scope is the current ConfiForms entry.

From ConfiForms version 1.33 - the filters are now context aware, you can reference current user and current page (using "this"). See ConfiForms Filters

Result nameresultNameYou can define your own "name" for IFTTT result, then can be refernced in next IFTTTs as ${iftttResult_YOURNAME}, where YOURNAME is the name you gave to the IFTTT result

Important: the "Create ConfiForms Entry" action does not support propagation of further " Create ConfiForms Entry " actions. This is to avoid infinite loops (an entry creates an entry in another form using IFTTT macro, which creates another entry in the first form, and so on).

ConfiForms TableView Merger

confiform-table-merger

This ConfiForms helper macro merges TableView results.

This macro takes RICH TEXT as an input to define which fields (ConfiForms Field macros) to display and which tables to merge (in the ConfiForms TableView macros). It supports expressions which can be used when aggregating the data. Learn more in TableView Merger examples.

Flatten multi-value fields before merging and aggregationflattenEntriesWhen checked, datasets will be flattened to represent each multivalue field selection as a separate and unique data row
FilterfilterSelect records based on this configuration; see detailed documentation at ConfiForms Filters   and/or in the tutorials.
Ordering/SortingsortRules for ordering or sorting entries in the dataset; see detailed documentation at Sorting in ConfiForms   and/or in the tutorials.
Limit a number of records returned (a number)limit

You can set the limit to the number of records returned. No limit when is blank

The same thing could be done using the filter and adding LIMIT n to the end of the filter

Enable exportexportThis parameter provides a way to download returned data in CSV, XML and JSON formats. Admin users can always export ConfiForms data with the administrative interface. For non-admin users, the form's owner should enable support for data export via 'Allow data export' in the ConfiForms form macro.
PaginationpagerA parameter to enable displaying records in sets (for example, in groups of 1, 25, 50, 100, or 200 per page); if not configured then all stored records are shown.
Striped table renderingwithHighlightingThis parameter enables highlighting alternate rows in a table.
Dynamic data sourcessources

Specify a pattern (search criteria) which be used as a search parameter to look for pages with ConfiForms Forms to connect as datasources for this TableView

You can see how many pages are matched in the preview mode. This will help you to understand and tune your query

Rendering moderenderModeSince version 1.19.1 we support rendering of table view merger results in 2 modes: as table (similar to TableView) and as card (similar to CardView)
For examples, see the documentation in Merge and aggregation for ConfiForms  and for advanced techniques, see  Advanced aggregations in TableView Merger.

TableViewMerger macro introduces couple of metadata parameters which can be referenced through the standard ConfiForms Field macro

You can access a property which holds form name this record is coming from and page where the form is registered

  • _sourcePage - of type page
  • _sourceForm - of type text

These are the names to be used as field names for ConfiForms Field macro in TableView Merger if you need to access the metadata of the origin of the records

ConfiForms Field Definition Rules

confiform-field-definition-rules

This macro configures how ConfiForms Field Definitions are related. It supports creating complex relationships between form fields, based on selections, values entered, and so on. To be used inside the ConfiForms Form macro to define rules for Field Definitions.

Field nameactionFieldNameThe name of the field to be tracked / validated.
Actionaction

Action to perform

  • Show field
  • Hide field
  • Set value
  • Set value if empty
  • Set expression
  • Validation rule
  • Validation rule (dataset) - the whole dataset could participate in the validation, like for example when you want to verify the uniqueness of the field value
  • Run custom JavaScript
  • Apply CSS on a field
  • Lookup and set value (from another ConfiForms Form)
  • Lookup and set DB value (from the database table / record / field)
  • Lookup and set the values from JIRA issue to ConfiForms fields
ConditionconditionThis parameter defines the condition to be met in order for the action to be executed; it uses the same syntax as in filters; and the scope is the current entry/record.
Actionable field namefieldName

When the 'Show/Hide field' action is used, this parameter specifies which fields are affected (can specify a list of comma-separated field names to affect many fields at once).

the name of the parameter depends on the action selected

Values to be setvalues

When the 'Set value' (or 'Set value if empty') action is configured, this parameter specifies which fields and values are to be set. Values are set as key-value pairs, separated by & (as request parameters), where the ''key'' is the field name, and the ''value'' is the entry to be set.

the name of the parameter depends on the action selected

Important to note that for validations the regular expression is expected! See Automatic validation for your fields
With reverse rulewithReverseRuleWill create an automatic reverse rule to be applied on the field (works with show/hide fields action)
CSS Rules for ConfiForms Fields

confiform-field-css

The macro to use to display fields based on their values. To be used inside the ConfiForms TableView, ListView, CalendarView, CleanView or CardView macros.

Field value or expression to matchconditionThis parameter accepts values or expressions, similar to filters (see the detailed documentation on filters: ConfiForms Filters). The scope for filtering is the whole dataset and depends on the container macro in which this macro is used as the dataset is passed from the container macro.
Field namefieldNameThe name of the field to which the CSS styling rule(s) should be applied; if left empty, the style is applied to the row.
Conditional CSScssThis parameter accepts valid CSS styles, separated by semicolon (for example: color:red;border:1px). Styles will be applied to a field (if given) or on a row when used within a table (a CSS container div is used when in ConfiForms ListView) if the field name is not set.
ConfiForms Entry Viewer

confiform-entry-viewer

The macro to use when you need to show all the fields for the stored entity in a readonly pop-up dialog.

Field namefieldNameName of the field defined on the form. Leave empty if you want to use just a static caption. See parameter below
Use the layout from ''ConfiForms Registration Control''regControlLayoutWill try to find the layout from a "main" ConfiForms Registration Control and use that for showing the form ("ConfiForms Registration Control" should be placed inside the ConfiForms Form macro body to be found)
Caption/label to usebuttonLabelStatic label to use for viewer field
Render astype

The control can be rendered as:

  • Button
  • Link
View modemode

How the controls in the dialog should look like

  • ReadOnly
  • Editable
VisibilityrestrictionsThis parameter accepts a comma-separated list of groups and users to which this field will be visible. Leave this parameter blank if there are no restrictions.
Hide control when stored data matches this criteriahideIfMatches Current ConfiForms entry stored by the form referenced will be concealed when the items in this parameter are matched in the entry. The control itself will be hidden when the condition/filter given is met, and this parameter uses the same syntax as in filters .
CSS stylescssThis parameter provides a way to apply CSS styles (for example: color:red; border:1px) to the field. Styles will be applied on stored values on output.
ConfiForms IFMatches Helper

confiform-ifmatches

The macro helps you to show the content blocks based on the field values in ConfiForms records (to be used inside the ListView or CalendarView)

Typetype

Evaluation method to use:

  • asVelocity
  • asFilter


ConditionconditionCondition, to match. The expression can be either a valid ConfiForms filter or a valid Velocity IF statement (you do not have to write the IF, but only the condition, which will be wrapped into IF statement for you)
Reversereverse

Reverse the condition

Use macro body to put the content you want to show/hide depending on the specified condition

ConfiForms Dynamic Filter

confiform-entry-filter

The macro helps you to create dynamic filters for your ConfiForms views.

ConfiForms Form nameformNameThe name of the ConfiForm to which this registration control should be linked. This parameter is required when the macro is used by itself (not inside the ConfiForms Form macro).  The name parameter can be skipped when the macro is configured inside the ConfiForms Form macro, and if not defined, the form name is automatically assigned.
Location page namepageTitleThe name of the page on which the form is defined if not the current one; leave this blank if the form is defined on the same page.
Label for filter buttonfilterButtonLabelCaption to use for filter button
Include form / filter reset buttonincludeResetButtonInclude or not the button which will help users to reset selected filters with one click
Label for reset form buttonresetButtonLabelCaption for reset filter form selections button
Key-value request parameterspresetValues

This parameter provides a way to preset values for certain fields in the form.  These are listed as key-value pairs, separated by & (as request parameters) where the ''key'' is a ConfiForms Field name and the ''value'' is the data to be preset for the field.

You can also pre-set some values from a context:

  • [now] - to set current date/time on the date/time field
  • [user.name] - current logged-in username (if anonymous access then "Anonymous" will be set)
  • [user.fullName] - current logged-in user's full name (if anonymous access then "Anonymous" will be set)
  • [user.email] - current logged-in user's email (if anonymous access then "" will be set as email)

use it like key=value, for example mydt=[now]

And also reference to "this" when page/user fields used

Use filter forfilterFor

You can use this filter with

  • table (TableView)
  • card (CardView)
  • list (ListView)
  • calendar (CalendarVew)
  • plain (PlainView)
  • clean (CleanView)

View macro must be configured to use the same form as a datasource as this filter macro

Additional filter to applyfilterConditionwhen set, this "condition" will be always added with "AND" operator to the user picked/constructed filter
Show only relevan choices for ysed dropdownsshowOnlyRelevantChoicesDropdown fields choices will be reduced to only available items
CSS stylescssCSS rules to be applied to the Submit button when the form is displayed as a pop-up dialog (when the form is embedded in the page, this button is not shown).
Visible only to groups/usersrestrictionsThis parameter accepts a comma-separated list of groups and users to which this field will be visible. Leave this parameter blank if there are no restrictions.
Hide control when stored data matches this criteriahideIfMatches ALL ConfiForms entries stored by the form referenced will be concealed when the items in this parameter are matched in the entry. The control itself will be hidden when the condition/filter given is met, and this parameter uses the same syntax as in filters .

Use macro body to create a custom layout for your filter control, just same as ConfiForms Registration Control macro. Also expects ConfiForms Field macros referencing a form to be present in the macro body.

When macro body is blank / empty then standard card-style layout is used and all form fields are set as filtering fields


How to reference a ConfiForms field (also Accessing field values and properties):

from IFTTT macro body

  • [entry.FIELD_NAME]
  • ${FIELD_NAME} (see IFTTT macro documentation for more details) deprecated
  • using the ConfiForms Field Macro when IFTTT is used to create a page, and in this case the value will be dynamic.
from IFTTT macro title parameter[entry.FIELD_NAME]
ConfiForms Registration Control, redirectURL parameter[entry.FIELD_NAME]
in Calculated/Formula field, when constructing an expression[entry.FIELD_NAME]



More detailed documentation bits

  • No labels