#LEFT(sqlDataArray[i][variables.ORDER_FIELD],50)#";
}
}
// Initialize the return variable
var retHTML = "";
// Get the CE Data
var dataArray = ArrayNew(1);
var qryData = QueryNew("temp");
var s = 1;
var sValue = "";
var appConfig = getGCAppConfig();
// Set the CS USER DSN from the Configuration Element
var csUserDSN = 'commonspot-users';
if ( structKeyExists(appConfig,"CS_USERS_DSN") AND LEN(TRIM(appConfig['CS_USERS_DSN'])) )
csUserDSN = appConfig['CS_USERS_DSN'];
// clean the search text
if ( arguments.queryType eq "search" )
arguments.searchValues = cleanChooserSearchText(arguments.searchValues);
SELECT Users.ID, Users.UserID, Users.AccountExpiration, Users.IPRestrictList, Users.PasswordLifetime,
Users.SourceDB, Users.LicensedContributor, Users.TransactionDate, Contacts.LastName,
Contacts.FirstName, Contacts.Middle, Contacts.LastNameLetter, Contacts.EmailAddress
FROM Contacts
RIGHT OUTER JOIN Users
ON Contacts.ContactID = Users.ID
WHERE
AND (
Users.UserID LIKE '%#sValue#%'
OR Contacts.FirstName LIKE '%#sValue#%'
OR Contacts.LastName LIKE '%#sValue#%'
OR
)
WHERE
ORDER BY '#variables.ORDER_FIELD#'