Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to group data by month (we use Virtual functions to format date as month)

Code Block
d.formatDate(MM)
ConfiForms Form Definition
formNamef

 

dddate

valvalnumber

All values

ConfiForms TableView
formNamef

d

val

 

Grouped by month and count

ConfiForms TableView Merger

d.formatDate(MM)

Count:([count])

f

 

 

 

Grouped by month and summarized

ConfiForms TableView Merger

d.formatDate(MM)

Amount:([entry.val])

f

 

 

 

Storage format for the solution

Code Block

<ac:structured-macro ac:macro-id="3b6beb46-cfe4-416b-9cde-93620daa42ad" ac:name="code" ac:schema-version="1">
  <ac:plain-text-body><![CDATA[d.formatDate(MM)]]></ac:plain-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="cf299091-0b52-4ebf-ab28-6234d23853de" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">f1</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="6adafd39-b987-4df2-abfa-8724e2e3e3c8" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:rich-text-body>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="207837ab-b088-447a-b257-c4492601b36d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">d</ac:parameter>
        <ac:parameter ac:name="fieldLabel">d</ac:parameter>
        <ac:parameter ac:name="type">date</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="0f793df6-744e-40a5-a6de-e5db5b8270a5" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">val</ac:parameter>
        <ac:parameter ac:name="fieldLabel">val</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>All values</p>
<ac:structured-macro ac:macro-id="99ca4d1c-0c43-440f-9358-c094beac8832" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">f1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="923720bb-2a72-46a9-951c-f4a153893805" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">d</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="d372989c-b8b4-46c7-b044-bfb4d5d08ea9" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">val</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Grouped by month and count</p>
<ac:structured-macro ac:macro-id="51c8afe5-6ba8-4a7e-a558-b6d8e066a9a7" ac:name="confiform-table-merger" ac:schema-version="1">
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="68d44399-f531-4401-bab4-21347cdf036a" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">d.formatDate(MM)</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="f142e6f8-6f1f-4cba-99e1-e5701f89288f" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">Count:([count])</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="dacd616a-909b-4e22-a6a4-a6b72210daa8" ac:name="confiform-table" ac:schema-version="1">
      <ac:parameter ac:name="formName">f1</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Grouped by month and summarized</p>
<ac:structured-macro ac:macro-id="f96aac1b-1089-4715-b7bc-af294fc919d3" ac:name="confiform-table-merger" ac:schema-version="1">
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="f9b8711d-8d90-4e1c-a6f8-668b73754010" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">d.formatDate(MM)</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="4110edc0-e18e-4317-ae54-a3d1dd6c9945" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">Amount:([entry.val])</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="6bae1e39-ce09-4ff4-8cae-3e3d14c4518e" ac:name="confiform-table" ac:schema-version="1">
      <ac:parameter ac:name="formName">f1</ac:parameter>
      <ac:rich-text-body>
        <p> </p>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>