Kendo Combobox - Advanced Filtering - kendo-combobox

Is it possible to filter on other properties in the datasource attached to a combobox?
For example, I have combobox with a list of customers, I want to be able to search on the customer name, First Name, Last Name and email.

It is posible if you concatenate the fields you want to search in one.
ie: concatField = FirstName + " " + LastName + " " + email.
You could show just the name if you want, but the textfield should be concatField.

Related

How to sort on hidden or data-attribute value in textSorter

I have a "name" column in a table that contains a persons full name (ie. first+last name). The objective is to sort the column based on the person's last name first, then first name. My initial naive approach for the textsorter function was
function (a, b){
const aSplit = a.split(' ');
const bSplit = b.split(' ');
const aReverse = aSplit[1] + aSplit[0];
const bReverse = bSplit[1] + bSplit[0];
return aReverse.localeCompare(bReverse);
}
Unfortunately, some of the names I have to sort have extraneous spaces in them, potentially in either the first name or last name field. So I have to support this in my sorting.
I am currently only using the combined first+last name string for display and sorting but I have access to the seperate name strings as well as a preformatted lastname, firstname version. I'd like to attach either of these to the <th> tags as a data attribute or something like that and sort using that instead of the actual value but I'm not sure how to go about accessing those attributes from within the textsorter function.
Maybe try this - when you build the table HTML, add the last name + first name into a data-text attribute of the cell. Tablesorter will automatically use that attribute over the actual text within the cell. See textAttribute option to allow changing that attribute name.

How to use a variabe value to name a file using SPSS syntax?

I have a data set with 100+ variables for each of many people.
I have two variables for the person's name: lastname and firstname.
How can I create an output file using the names (i.e., the values of the variables lastname and firstname)?
I would like to do a split file by lastname firstname and export the data for each person into a text file that uses the person's name as the file name.
Below is what my spss command file is doing now. How can I get the command file to spit out separate files for each person?
SORT CASES BY lastname firstname .
SPLIT FILE BY lastname firstname .
PRINT / " ".
PRINT /
"===================================================================".
PRINT / "Report of Selected Responses from the".
PRINT / "Survey Form Document".
Print /"Responses for Candidate: " .
Print / firstname.
Print / lastname.
PRINT /
"===================================================================".
DO IF (Q1.5month EQ "" OR sysmis(q1.5day) OR sysmis(q1.5year) ).
Print
/ "1.5. Some or all of date of birth left blank".
END IF.
[More such print statements.]
EXECUTE.
SPLIT FILE OFF.
First create an empry string variable and populate it:
String firstname_lastname (A100).
Compute firstname_lastname=concat(rtrim(firstname),"_",rtrim(lastname)).
EXECUTE.
Then go to Data menu, Split into files, select your new firstname_lastname variable as the split variable, and.under options select "value labels". Pick a folder and you are done. Maybe click paste, to have everything in syntax 😉

SSRS Filter on 2nd list

I have two SharePoint lists that have “RequestID” in common. The primary list for the report is “Action Items”, but I only want to see those records where the Application equals the selected parameter. The Application is in the “Requests” list.
I want to filter for the Application name = 'Math', so in this case, I would only get Action Item Ids 44 and 55 which relate to Requests #15 and #22.
I have successfully displayed the name of the application in the report using this:
=Join(LookupSet(CInt(Fields!Request_ID.Value), CInt(Fields!ID.Value), Fields!Application.Value, "Requests"), ", ")
But, I understand that you cannot use a Lookup in a filter. Any ideas?
It sounds like you should be using Cascading Parameters to do what you want.
With Cascading Parameters, you select the Application in one parameter and then base the selection for the Action Items parameter that uses the Application parameter.
With SQL you could filter the dataset for the ActionItemIDs:
SELECT ActionItemID
FROM ACTION_ITEMS
WHERE REQUEST_ID IN (SELECT REQUEST_ID FROM REQUESTS WHERE APPLICATION = #APPLICATION_PARAMETER )
But you can FILTER the Action Item SharePoint list on the DataSets FILTER tab:
Expression:
=IIF(INSTR(
Join(LookupSet(Parameters!#APPLICATION_PARAMETER.Value, Fields!Application.Value, Fields!ID.Value, "Requests"), ",") & ","
, Fields!Request_ID.Value & ",") > 0, 1, 0)
This looks for the Request ID being in the list (from the LookUp [15,22,]) of ID with the Parameter (MATH) as the App.
https://technet.microsoft.com/en-us/library/aa337169(v=sql.100).aspx
https://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx

How to concatenate 2 fields from a dataset using LiveBindings?

Is there a way to use the Live Binding Designer to concatenate 2 database fields to a component?
For example I have a MemTable for client, I want to concatenate the FirstName and LastName (fullname) to a label.
If there is a way to do that, I understand that the binding will be in one direction only (Database fields --> ComponentProperty).
The easyest way to do with LiveBinding, is to use the CustomFormat property of the LinkFillControlToField :
Just use this format text as the example is the question:
Self.Owner.FirstName.text + " " + Self.Owner.LastName.text
For something simple like this...you can use the AfterScroll Event of your Dataset
if Dataset.Active and (Dataset.RecordCount > 0) then
label1.Caption :=Dataset.FieldByName('FirstName').AsString + ' ' + Dataset.FieldByName('LastName').AsString;

Jquery autocomplete to search within more than one columns of a table

Jquery UI's autocomplete has given the solution to searching through one column of a table. So if you get the source from a table with firstname field then you can only search with firstname.
But say you have more than one fields to search against like firstname, lastname, postcode, contactNumber. Then in that case how would you implement something like this for autosuggest.
I mean that user should be able to search with whatever field they like and the autosuggest should be able to give them the suggestions based on that.
Is this possible?
The source can be an array, a string or a function.
You'd have to write a custom function to read all the values in all the columns of the tables and store them in an array. Then call the .source method with your array.
For bonus points, a series of checkboxes above the search field would ask the user to search only those columns.
[ ] FirstName [X] Lastname [X] Department
_Smith_____
John Smith IT
Waylon Smithers Assistant to the Assistant Regional Manager
Jackie Brown Gunsmith

Resources