Moonsoft Software Solutions

How to remove duplicate entries from Option List

Started 8 Mar 2018 · 1 reply

  1. liam.baker
    Hello,

    First of all, thank you for your support so far.

    I have a query regarding the optionlist list. I currently have a field which populates its data from another list using the following SQL code:

    select value,value from #__listmanager_values where idfield=1

    My problem is, as the original list builds up I have multiple duplicate entries in idfield=1. This is causing the optionlist to auto populate with all of the items (including the duplicate ones). Is there a way to strip out the duplicates so only unique fields are loaded in the optionlist?

    Cheers

    Edited by liam.baker - 08.03.2018 13:57
  2. Moonsoft support
    Hello,
    you can try to configure using a 'select distinct' or 'group by' at your sql in order to discard duplicates. Here we share the official docs so you can check the syntax:

    https://dev.mysql.com/doc/refman/5.7/en/distinct-optimization.html

    Regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket