var qryData = QueryNew("temp"); var userStruct = StructNew(); var userArray = ArrayNew(1); 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 Users.ID = if ( qryData.RecordCount GT 0 ) userArray = Application.ptCalendar2.data.queryToArrayOfStructures(qryData); if ( ArrayLen(userArray) ) userStruct = userArray[1]; var userName = getCSUserInfoByID(arguments.ID).UserID; if ( Len(Trim(userName)) EQ 0 AND arguments.showNullMsg IS true ) userName = '[user name error]'; var userEmailAddress = getCSUserInfoByID(arguments.ID).EmailAddress; if ( Len(Trim(userEmailAddress)) EQ 0 AND arguments.showNullMsg IS true ) userEmailAddress = '[no email address listed]'; var qryData = QueryNew("temp"); var userNameList = ''; SELECT ID, UserID FROM Users WHERE ID IN () if ( qryData.RecordCount GT 0 ) userNameList = ValueList(qryData.UserID); var qryData = QueryNew("temp"); var userEmailList = ''; SELECT Users.ID, Users.UserID, Contacts.EmailAddress FROM Contacts RIGHT OUTER JOIN Users ON Contacts.ContactID = Users.ID WHERE Users.ID IN () if ( qryData.RecordCount GT 0 ) userEmailList = ValueList(qryData.EmailAddress);