Project

General

Profile

QFQ Merge » History » Version 16

Enis Nuredini, 24.06.2024 15:34

1 1 Enis Nuredini
h1. QFQ Merge
2
3
{{toc}}
4
5 16 Enis Nuredini
QFQ Dokumentation:  http://docs.qfq.io/en/master/Report.html#merge-data
6
7 1 Enis Nuredini
h2. Installation
8
9
QFQ Merge feature should be installed automatically with new QFQ Version 24.3.x
10
If the automatic upgrade wasnt successful, here are some important points:
11
12
h3. SQL Function and Procedure
13
14
QFQ should deliver one sql function and one procedure called:
15
* build_dynamic_columns
16
* auto_insert_merge_rules
17
18 2 Enis Nuredini
If one of these is missing then take these SQL statement to import it: 
19 1 Enis Nuredini
attachment:build_dynamic_columns.sql
20
attachment:auto_insert_merge_rules.sql
21 3 Enis Nuredini
22
h3. Grp Table
23
24
Check if the table 'Grp' exists in database.
25
Table should have following columns:
26
* id
27
* grId
28
* name
29
* reference
30
* value
31
* value2
32
* value3
33
* value4
34
* comment
35
* enabled
36
* modified
37
* created
38
39 4 Enis Nuredini
SQL structure:  attachment:Grp.sql
40
41 3 Enis Nuredini
In this table two records with following references should already exist:
42
* qfq_merge_rule
43
* qfq_merge_query
44 5 Enis Nuredini
45
SQL Merge Records:  attachment:Grp_merge_data.sql
46 6 Enis Nuredini
47
h3. QFQ Merge Page
48
49
Create for the merge tool a new page in Typo3 backend if not already done.
50 7 Enis Nuredini
Create a new qfq tt-content on that page with following content (http://docs.qfq.io/en/master/Report.html#merge-tool):
51 6 Enis Nuredini
<pre>
52
file=_mergeData
53
</pre>
54 8 Enis Nuredini
55
h2. Configuration
56
57
h3. New Rules
58
59
Let's trigger the automation to create some new rules depending on a beginning pId column name:
60 11 Enis Nuredini
!{width:300px}qfq_merge_rule_01.png! !{width:300px}qfq_merge_rule_02.png!
61 12 Enis Nuredini
62
After a page reload all created rules should be displayed in the table.
63
The auto created rules are all per default enabled. It's possible to edit, delete or create new rules.
64
An example of a special rule:
65
!qfq_merge_rule_03.png!
66
67
h3. New Search Query
68
69
Create a new search query.
70
Its important to use the predefined keywords:
71
* _tableName
72
* _id1
73
* _id2
74
* _column1
75
* _column2
76
* _key
77
78
!qfq_merge_query_01.png!
79
80
Example of a query can be found here: http://docs.qfq.io/en/master/Report.html#merge-tool
81 13 Enis Nuredini
82
h2. Usage
83
84
Select the data on which you want to proceed the merge:
85
!qfq_merge_01.png!
86
87
As default the primary record with lower ID is selected to keep:
88
!qfq_merge_02.png!
89
90
It's important to know that the merge tool focuses on the linked records. The comparsion and merge of the data from the primary table itself should be done by the user manually. It's helpful to define the output of these data in the search query (_column1, _column2). 
91
!qfq_merge_03.png!
92
93 14 Enis Nuredini
Select the records you want to merge with the selected primary ID (keep). Unselected records will be deleted and records with a dash will not be changed.
94 15 Enis Nuredini
!qfq_merge_04.png!