How to make datalist items searchable

Showing results for 
Search instead for 
Did you mean: 
Active Member II

How to make datalist items searchable

Hi Team,

I have created custom datalist model using below code.

		<type name="emp:employeeDetails">
			<title>Employee Details</title>

				<property name="emp:empId">
					<title>Employee ID</title>
					<index enabled="true">

				<property name="emp:firstName">
					<title>First Name</title>
					<index enabled="true"/>

Added below code in share-config-custom.xml file.

<config evaluator="model-type" condition="emp:employeeDetails">
		<!-- Search form -->
				<form id="search">
						<show id="emp:firstName" force="true" />
						<field id="emp:firstName">
								template="/org/alfresco/components/form/controls/textfield.ftl" />

I want to make First Name property as searchable.
Wherever we use cm:title or cm:description property, that value is searchable but search result is  not in a user friendly manner.OOTB fields search resultOOTB fields search resultIs there any other configuration required or am i missing something?


4 Replies

Re: How to make datalist items searchable


You need to override below file with your custom property.


  (cm:name cm:title cm:description cu:customprop TEXT TAG)



		(cm:name cm:title cm:description cu:customprop ia:whatEvent ia:descriptionEvent lnk:title lnk:description TEXT TAG)

Replace your property with cu:customprop .


This is working but it displaying result as you posted because datalist item create node and it is assigning nodeid as title and live search trying to display title that's why it is  user friendly manner,

Senior Member

Re: How to make datalist items searchable

Each entry in the data list creates a node in the back-end.

As the data list is a kind of content model you can search the content through its properties but

the content stored in the repository for the reference only. So when you will search its property it will show the node created in the repository as a search result.

Users are supposed to search the data list entries through the data list UI only.

I don't know whether it will be useful for you or not but there is an add-on available for the filtering of the data list entries.

Check if it is compatible with 5.2.


Active Member II

Re: How to make datalist items searchable

Hi @sanjaybandhniya 

I have tried and getting the result for custom property also, getting node id as a result.

But for end user, it will be difficult to understand the output and i have more than 50 custom datalists(with unique columns) in the application.

So, is there any way we can view custom property in search result and on click it should redirect to datalist page?


Re: How to make datalist items searchable

You can display your custom property in live search but redirection to datalist is may be difficult because by default it is redirecting to node location.

You need to override SearchBox.js aikau widget to display property.

Alternate way is you can assign any datalist property to title so it looks proper in display.(you need to override datalist item creation webscript)