// CUSTOM ELEMENT INFO //variables.DSN = "commonspot-users"; //variables.CUSTOM_ELEMENT = ""; variables.CE_FIELD = "ID"; variables.SEARCH_FIELDS = "USERID,FirstName,LastName"; variables.ORDER_FIELD = "USERID"; // Layout Flags //variables.SHOW_SECTION1 = false; // true- Boolean //variables.SHOW_SECTION2 = false; // true - Boolean // STYLES variables.MAIN_WIDTH = 480; variables.SECTION1_WIDTH = 250; variables.SECTION2_WIDTH = 250; variables.SECTION3_WIDTH = 380; variables.SELECT_BOX_HEIGHT = 180; // 350 variables.SELECT_BOX_WIDTH = 200; // 250 variables.SELECT_ITEM_HEIGHT = 24; // 53 variables.SELECT_ITEM_WIDTH = 160; //210 variables.SELECT_ITEM_CLASS = "ui-state-default"; variables.JQUERY_UI_THEME = "ui-lightness"; // ADDITIONS //variables.SHOW_ALL_LINK = false; // true - Boolean variables.ADD_NEW_FLAG = false; // Boolean variables.ADD_NEW_URL = ""; variables.ADD_NEW_LB_WIDTH = 600; variables.ADD_NEW_LB_HEIGHT = 420; // NEW VARIABLES v1.1 variables.SHOW_SEARCH = true; // Boolean // TODO: Set-up so search values and search fields can return the correct values variables.SHOW_ALL_LINK = true; // Boolean variables.SHOW_ADD_LINK = false; // Boolean variables.SHOW_EDIT_DELETE_LINKS = false; // Boolean var retHTML = ""; var i = 1; var sqlDataArray = getChooserData(arguments.item, arguments.queryType, arguments.searchValues, arguments.csPageID); // Loop over the data for ( i=1; i LTE ArrayLen(sqlDataArray); i=i+1) { // Assemble the render HTML if ( StructKeyExists(sqlDataArray[i], "#variables.ORDER_FIELD#") AND LEN(sqlDataArray[i][variables.ORDER_FIELD]) AND StructKeyExists(sqlDataArray[i], "#variables.CE_FIELD#") AND LEN(sqlDataArray[i][variables.CE_FIELD]) ) { retHTML = retHTML & "
  • #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#'