• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

How to eliminate duplicate data in CDD ?


New Member

I tried several options but I either get an error or all the data are not displayed from the dropdown menu.

I have a CDD element in a table overlapping with following concat
(SELECT activity_name FROM activities WHERE id = {thistable}.activity_name)

{thistable} (intemgroup1 table name) is a relational table containing IDs of the other tables.
Project Activities Subactivities
1 1 1
1 1 2
2 1 1

So in the dropdown list I get all the data related based on the watch field which is project. so I get the following dropdown:
Project 1

Activities dropdown list 1,1,2,2,2,2,3,3,3,3
(with the concat in the dropdown list names are displayed not the ids)

I want to display only one value of the activity not all the options.

The last thing I tried is below but it displays empty dropdown list under activities.
I must be missing something and if anyone had similar issue I appreciate your help.

In where clause under CDD element:

(SELECT DISTINCT activity_name from intemgroup1)

I don't understand your setup.
A table used in Fabrik needs a unique id (PK) column (you can't use e.g. composite PKs).
DD and CDD elements are storing such a PK in the database.
If you get identical activity_names in your dropdown something is not unique.
Hello troester

Thank you for your help. Its all good its been a while since i have used fabrik many years ago :). I resolved the duplicate records using the following query:

->select(array('DISTINCT intemgroup1.id', 'activities.activity_name'))
->from('intemgroup1', 'activities')

I have another problem though hopefully I will resolve it over the wknd.

Thank you again
We are in need of some funding.
More details.

Thank you.

Members online