#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");
// clean the search text
//if ( arguments.queryType eq "search" )
//arguments.searchValues = cleanChooserSearchText(arguments.searchValues);
// Get custom element data
//dataArray = getCEData(variables.CUSTOM_ELEMENT, variables.CE_FIELD, arguments.item, arguments.queryType, arguments.searchValues, variables.SEARCH_FIELDS);
// if are returning the selected items
// sort the dataArray array order to match the passed in items ID order
//if ( arguments.queryType NEQ "selected" ) {
// sort the dataArray
//dataArray = arrayOfCEDataSort(dataArray, variables.ORDER_FIELD);
//}
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 ID NOT IN ()
WHERE ID IN ()
ORDER BY '#variables.ORDER_FIELD#'