Ok, if I copy it exact like you have it here, it works, but the drop-down shows the profile ID number.
I would like for it to show First Name and Last Name in the dropdown (like the "formatname" field), but sorted by Last Name then First name. I would also like for it to store the information in the database with the First and Last Name (like the "formatname") so that when I pull a report from the database, it will show the name and not the ID or username.
I tried editing the formula however, I keep getting a error message when I try to access the profile so apparently I did something wrong. This is one of what I tried:
SELECT u.`formatname`, u.`username`
FROM `#__comprofiler` AS c
INNER JOIN `#__users` AS u
ON u.`id` = c.`id`
WHERE c.`confirmed` = 1
AND c.`approved` = 1
AND u.`block` = 0
ORDER BY u.`username`
What am I doing wrong?
I apologize I am such a novice on this, but I am trying to learn.