select distinct

populate a dynamic dropdown with unique values from a single database field.

Overview

The issue arises when using the Read Data action in CF, which by default retrieves all records, including duplicates, for a field.
To get only distinct values, modify the SQL query in the Read Data action to use a GROUP BY clause on the specific field instead of SELECT DISTINCT.

Answered
ChronoForms v7
kg kgriffin 12 Jan, 2021
Hi-

How do I do the equivalent of SELECT DISTINCT for a single field with Read Data to create a list for a dynamic dropdown?

Thanks.
Max_admin Max_admin 15 Jan, 2021
Answer
use group by that field!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.