I have a form that I use to collet billing information. I have 3 drop down lists in the form that is filled using a secondary data source. I created the data connection with the following information:
1. https://MyServer/qdabrawebservice/databaseenumerationservice.asmx?WSDL
2. GetColumnsForRows
3. (ns1:database = PIMS) and ( ns1:table = Infov_Therapist)
TheInfov_Therapist is a list of Therapist along with their UserID (Primary Key). The view sorts correctly when the columns are in the following order:
SELECT TOP (2147483647) UserName, UserName + ' ( ' + Title + ')' AS TherapistUserName, UserID, EmailAddress, Title, First + ' ' + Last AS FullName
FROM dbo.Users
WHERE (Title LIKE '%PT%') OR
(Title LIKE '%OT%') OR
(Title LIKE '%MT%')
ORDER BY UserName

The view sorts Incorrectly when the columns are in the following order:
SELECT TOP (2147483647) UserID, UserName, UserName + ' ( ' + Title + ')' AS TherapistUserName, EmailAddress, Title, First + ' ' + Last AS FullName
FROM dbo.Users
WHERE (Title LIKE '%PT%') OR
(Title LIKE '%OT%') OR
(Title LIKE '%MT%')
ORDER BY UserName
