Page tree

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.

In this tutorial we will demonstrate how to use a new feature of ConfiForms to construct dynamic filters over your stored data. The macro is called ConfiForms Dynamic Filter

If you are new to ConfiForms, please take a few minutes to read the Basic concepts Guide, or go through the video tutorial on that page.  (smile)

As usual, let's start with a simple form. The form will have 3 fields

Field labelField nameType
My Text Fieldmytffieldtext
My Dropdown Fieldmydropdownfieldadvanced dropdown
My Text Areamytextareatextarea

Storage format

<ac:structured-macro ac:macro-id="45a7667b-79d4-4896-9830-705af8285cb8" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">f</ac:parameter>
      <ac:structured-macro ac:macro-id="580584ec-6e33-4fb0-bc98-8f50d55cfd01" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">mytffield</ac:parameter>
        <ac:parameter ac:name="fieldLabel">My Text Field</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      <ac:structured-macro ac:macro-id="2a7dd6b1-30c4-4602-91eb-8753d391ddc1" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">mydropdownfield</ac:parameter>
        <ac:parameter ac:name="fieldLabel">My Dropdown Field</ac:parameter>
        <ac:parameter ac:name="values">false[1=one|2=two|3=three|4=four|]</ac:parameter>
        <ac:parameter ac:name="type">select2</ac:parameter>
      <ac:structured-macro ac:macro-id="7399797b-9c13-461b-a8eb-3a763673d5b3" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">mytextarea</ac:parameter>
        <ac:parameter ac:name="fieldLabel">My TextArea</ac:parameter>
        <ac:parameter ac:name="type">textarea</ac:parameter>
      <ac:structured-macro ac:macro-id="746fdd65-348b-4c8c-be60-b48044c67761" ac:name="confiform-entry-register" ac:schema-version="1">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
          <p> </p>

Something like this

We will add some records into the form

Now it is time to bring in the ConfiForms Form Filter Control macro

Here is the macro, with the default settings it takes all the fields from the form and present them in a card view. You can easily change the layout of this, see below

The macro has been renamed from ConfiForms Dynamic Filter Control to  ConfiForms Form Filter Control macro

ConfiForms Form Filter Control macro supports custom layouts. If you wish to have a free text search with custom layout then add a ConfiForms Field macro inside the Filter Control macro body and set it's field name parameter to *


But it does not work without a "view"... without "views" macros, such as CalendarView, ListView, TableView or CardView. 

Trying to use it without a view will result in a warning message

So we need a "view"

We will use the default ConfiForms TableView

However, for TableView and CardView you *MUST* enable support for filter in macro properties

Now we can use the filter

Very important note:

You have to set the type of view used with this filter in Dynamic Filter macro. We have not done it, because the defaul mode is "table"

But this setting in ConfiForms Dynamic Filter macro must reflect what type of view macro you are trying to use with this filter

(name of the form and page where the form is located must match in "view" and in filter)

Here is an example using the Dynamic filter with custom layout and using it  together with a ListView

  1. We have put ConfiForms Field macro inside the Dynamic Filter to force own layout and use only the fields we want
  2. We Enabled Filter for "list" (listview) in Dynamic Filter
  3. We created ListView with custom layout (ListView and CalendarView do not require filter support to be explicitely set, it is there by default. In TableView and CardView it is off by default to support clean tables and compatibility with COnfluence Chart macro)

Here is how it looks like on the page

Thank you for you time and reading this far. The tutorial now ends, but there is a bit more to explore in Dynamic Filter macro, such as:

  • You can reduce the number of choices in dropdown fields (and all other choice-enabled fields) to show only available values
  • When you enable inline search on "views" you will actually see what filter is used to filter
  • You can set "views" to show nothing initially (useful for large dataset). To do this you need to write some filter which will not match anything. One to suggest is to use internal field _today and compare it agains 0


    Which is always false, as _today holds the current timestamp
    More about filter can be found here: ConfiForms Filters

  • You can add a form reset button (setting in Dynamic Filter macro) to ease the clean up of fields to start over

  • No labels