Page tree
Skip to end of metadata
Go to start of metadata

LIVE Example of TableView Merger

 Click here to expand...
<ac:structured-macro ac:macro-id="a1529b36-ff00-4b50-80f0-da941adec9d1" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">Invoice1</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Invoices rows</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="7be7e7f2-499c-4086-9cd2-a5954f1dd0c3" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">type</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Type</ac:parameter>
        <ac:parameter ac:name="values">false[1=Consulting|2=Repair|3=Transport|]</ac:parameter>
        <ac:parameter ac:name="extras">label;false</ac:parameter>
        <ac:parameter ac:name="type">select</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="1d9a2690-2e83-4764-9ea7-70094cadc3b0" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">description</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Description</ac:parameter>
        <ac:parameter ac:name="type">textarea</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="7755a69a-3d17-4fcc-a68d-4d13eda5217d" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">price</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Price</ac:parameter>
        <ac:parameter ac:name="fieldDescription">in eur</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="37f431bc-9cfc-4975-9429-6ee3de67ea40" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">count</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Count</ac:parameter>
        <ac:parameter ac:name="fieldDescription">pcs</ac:parameter>
        <ac:parameter ac:name="type">number</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>
    </p>
    <p> <ac:structured-macro ac:macro-id="d23698df-27c3-4502-9e67-b6b74d63520d" ac:name="confiform-entry-register" ac:schema-version="1">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
        <ac:rich-text-body>
          <p> </p>
        </ac:rich-text-body>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>ALL stored data</p>
<ac:structured-macro ac:macro-id="80220cd8-0cdd-4527-a1a8-7d41d02657a4" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">Invoice</ac:parameter>
  <ac:rich-text-body>
    <p> <ac:structured-macro ac:macro-id="25a2f91b-901f-4f3f-8364-906324291afa" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">type</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="ffe9390f-d35e-48c7-ada0-27d1566b142f" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">description</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="c34c0a39-93d5-409a-89ea-b360f2023ce5" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">price</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="414c44a6-1208-4368-b007-0b7f44a6af08" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">count</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p> </p>
<p>Totals per type</p>
<ac:structured-macro ac:macro-id="30654675-fc29-4a5f-b82e-82682150fd02" ac:name="confiform-table-merger" ac:schema-version="1">
  <ac:rich-text-body>
    <p> <ac:structured-macro ac:macro-id="3b540c9e-5243-4a37-8fc8-03858983fe8b" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">type</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="39c9fcd4-b4ea-4174-91f0-b44778108573" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">Total:([entry.count]*[entry.price])</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="12fa94ed-24aa-484a-8ff8-7b123dac31fa" ac:name="confiform-table" ac:schema-version="1">
      <ac:parameter ac:name="formName">Invoice</ac:parameter>
      <ac:rich-text-body> </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Record ID is used as a grouping key, together with a type and therefore rows are showed separately</p>
<ac:structured-macro ac:macro-id="e5bdffe1-2841-4885-be2a-dadc408eaf28" ac:name="confiform-table-merger" ac:schema-version="1">
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="d01c437d-d68a-4141-9b68-4595e616d2cb" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">id</ac:parameter>
      </ac:structured-macro> </p>
    <p>
      <ac:structured-macro ac:macro-id="5903bb6e-b217-46f4-be77-3a435637f7b7" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">type</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="a62605e1-9a0e-414a-b65f-8614810d5c31" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">Total:([entry.count]*[entry.price])</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="630cd566-0723-493b-8042-7ba52280b149" ac:name="confiform-table" ac:schema-version="1">
      <ac:parameter ac:name="formName">Invoice</ac:parameter>
      <ac:rich-text-body> </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Same, as above, but description field used as a grouping key, together with a type and therefore rows are showed separately. </p>
<ac:structured-macro ac:macro-id="17df3203-dc06-4567-91b7-8bcf2624fc77" ac:name="warning" ac:schema-version="1">
  <ac:rich-text-body>
    <p>Important to note is that IF there are rows with SAME type and description they will be MERGED! See below</p>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="4be247d7-4b37-40c7-9c6c-2d3f1aa032fe" ac:name="confiform-table-merger" ac:schema-version="1">
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="9d9541ed-751e-4363-8740-1ef8b82a3e73" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">type</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="5eb340e8-d8b6-4d1b-ac55-cff058f05f65" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">description</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="911211ff-91ca-48bf-9bd1-2b431b46c682" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">Total per row:([entry.count]*[entry.price])</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="7f15fa9a-821c-43a0-bc3e-f80d1d7a2fbb" ac:name="confiform-table" ac:schema-version="1">
      <ac:parameter ac:name="formName">Invoice</ac:parameter>
      <ac:rich-text-body> </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Chart showing invoice items grouped by TYPE and with their totals</p>
<ac:structured-macro ac:macro-id="ecb4d365-e591-46fd-92d2-9f742230f649" ac:name="chart" ac:schema-version="1">
  <ac:parameter ac:name="3D">true</ac:parameter>
  <ac:parameter ac:name="orientation">vertical</ac:parameter>
  <ac:parameter ac:name="showShapes">false</ac:parameter>
  <ac:parameter ac:name="width">950</ac:parameter>
  <ac:parameter ac:name="rangeAxisLowerBound">1</ac:parameter>
  <ac:parameter ac:name="dataOrientation">vertical</ac:parameter>
  <ac:parameter ac:name="title">Invoice data</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="c65cc40c-3d2f-4331-b759-938946fce84c" ac:name="confiform-table-merger" ac:schema-version="1">
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="cfbe3c84-9751-4664-8723-2c32ba1ca7b6" ac:name="confiform-field" ac:schema-version="1">
            <ac:parameter ac:name="fieldName">type</ac:parameter>
          </ac:structured-macro>
        </p>
        <p>
          <ac:structured-macro ac:macro-id="18d3904f-c0df-4af2-9fc8-8ee2b9c0d02b" ac:name="confiform-field" ac:schema-version="1">
            <ac:parameter ac:name="fieldName">Total:([entry.count]*[entry.price])</ac:parameter>
          </ac:structured-macro>
        </p>
        <ac:structured-macro ac:macro-id="a06e57da-b3fe-435a-9dc8-aa002b000f67" ac:name="confiform-table" ac:schema-version="1">
          <ac:parameter ac:name="formName">Invoice</ac:parameter>
          <ac:rich-text-body> </ac:rich-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p> </p>


So, we have a form with 4 fields

  • type - dropdown field
  • description - text are field to store invoice item details
  • price - numeric field to store numeric data for item price
  • count - numeric field to store number of items per that price



ALL stored data 

Type

Description

Price

Count

Consulting some consulting work 100 4
Transport delivery 23 2
Transport another delivery 35 1
Transport delivery 23 1
Consulting boid 100 2
Consulting 10 10
Repair 43 2
Consulting sdfsdfsd 3 3
Consulting 100 200
Repair jhkjh 350 5
Consulting ujtu 10 1
Repair 40 5
Consulting dfssd 23 2
Consulting er 13 2
Consulting desc 3 1
Consulting 56 5
Repair rzrtz 10000 2
Consulting lhl i68 876
Consulting fghgfh 1 1
Consulting fsdqfdg 15 1
Consulting 10 3
Repair 2 3
Consulting Test 12 1
Consulting 132 3123
Consulting 454 45
Consulting 121212 12 1
Consulting Test123456999 7 2
Consulting a 1 1
Consulting fghjfg 56 10
Transport 50 20
Consulting test 10 2
Consulting 2 2
Consulting test 10 10
Consulting AA 12 12
Consulting asdasd 22 1
Consulting 231eqwr 22 2
Repair adsfasfd 12 9


To get Totals per type

We have 2 fields in TableView Merger, type and Total which is described as expression

Total:([entry.count]*[entry.price])

Type

Total

Consulting 21074, NA, 1, 15, 3E+1, 12, 412236, 2.043E+4, 12, 14, 1, 5.6E+2, 2E+1, 4, 1E+2, 144, 22, 44
Transport 1104
Repair 22150


Record ID is used as a grouping key, together with a type and therefore rows are showed separately

We have 3 fields in TableView Merger, id, type and Total which is described with the same expression

Total:([entry.count]*[entry.price])

Id

Type

Total

7720ce38-adb6-4466-8f6d-27878f4c6ff2 Consulting 400
50571577-0cc2-42ca-9193-9fe7e0cecd30 Transport 46
9fd98121-cecd-46ee-89d6-9deb316bc0a4 Transport 35
9cbbc2fe-f301-4055-8368-3a89fc32828c Transport 23
834657f8-4424-4dbd-8ef8-654cb499687d Consulting 200
979bef10-614c-42c2-aa24-db37dd139dd7 Consulting 100
a4ad5938-d65f-4d74-af6d-4f4a02aa8bda Repair 86
640be8d4-cf20-45ae-ab0f-31c1932efc8f Consulting 9
9b0b3bcb-85d7-4fd5-a8ab-78757fa30ef7 Consulting 20000
415ce74b-1d96-48c9-9431-ea2854db8284 Repair 1750
14414f5f-1c39-45b5-8ce5-105a63b13208 Consulting 10
55d72334-304f-43a5-aefe-3de2a6659652 Repair 200
4c822c08-28af-4415-8aa2-a15fb47c40eb Consulting 46
086dfca2-4002-46ce-a1b3-4ad7181c042f Consulting 26
5f386f57-70a1-41f3-9a61-39f76c2428f8 Consulting 3
00e90cac-8cc7-4cfe-99ae-40406128fdc9 Consulting 280
2b646d79-c607-4bee-84fe-123385101bbb Repair 20000
6d0935de-9a37-4008-acf3-a28f106e8a17 Consulting NA
0bd37c0c-7448-426b-96fe-a65a64dc0805 Consulting 1
d5f1a1cb-30b1-4cf5-9bd5-ae59d73a7abc Consulting 15
fff52742-5ab8-4fcd-9660-e4e7db238a72 Consulting 30
bbea3fa2-edec-4c2d-976c-af42920c1423 Repair 6
210c7aca-2aa1-485f-8ea0-a4bdeea21d12 Consulting 12
96e2158d-7243-4c2a-bc33-dfb7c813c487 Consulting 412236
460fc62a-7986-41cf-b7b6-d02e424dbb59 Consulting 20430
7c00cc13-c6e9-4625-a759-0813146d7f97 Consulting 12
f49d11b3-d6c6-4d3d-a346-cec4c907ed84 Consulting 14
e3bf13ec-d547-462c-ac77-4f2bc97151da Consulting 1
64d88ade-c6cb-4d4a-a581-1ddbab32ae5b Consulting 560
003ec339-e989-45cd-9e9f-4f7613de8a52 Transport 1000
dcce2373-757f-41c6-93e6-e10f00950a69 Consulting 20
7e31b9b3-7908-4993-b89d-8ff83ecc5d65 Consulting 4
053969ad-c757-4e40-b2ca-9ae350689446 Consulting 100
ec5950c9-519c-4268-9480-089a2907a7ec Consulting 144
2a0eea72-ee3d-4329-9057-94f857d382db Consulting 22
4ee301bf-8cce-4d38-a058-3b0d0a0fa290 Consulting 44
a2a2a340-3ca7-4437-a842-a862b441b702 Repair 108


Same, as above, but description field used as a grouping key, together with a type and therefore rows are showed separately. 


We have 3 fields in TableView Merger, type, description and Total which is described as expression

Total:([entry.count]*[entry.price])

Important to note is that IF there are rows with SAME type and description they will be MERGED! See below

Type

Description

Total per row

Consulting some consulting work 400
Transport delivery 69
Transport another delivery 35
Consulting boid 200
Consulting 453080
Repair 292
Consulting sdfsdfsd 9
Repair jhkjh 1750
Consulting ujtu 10
Consulting dfssd 46
Consulting er 26
Consulting desc 3
Repair rzrtz 20000
Consulting lhl NA
Consulting fghgfh 1
Consulting fsdqfdg 15
Consulting Test 12
Consulting 121212 12
Consulting Test123456999 14
Consulting a 1
Consulting fghjfg 560
Transport 1000
Consulting test 120
Consulting AA 144
Consulting asdasd 22
Consulting 231eqwr 44
Repair adsfasfd 108


Chart showing invoice items grouped by TYPE and with their totals (Chart macro uses the same table as you can see in 1st example, where we group by type field and calculate totals per row)