08-14-2018 05:32 AM
Hi All,
I have folllowing usecase
User upload documents in Alfresco with metadata attached for all the uploaded documents - for eg 'Policy number' .
A user from other group - Need to query using document with metadata ( 'Policy number' ) , while querying user input policy number.
To implement this
Can i provide Smart folde with dyanmic query based on user input ? - Is this something which is achievable using smartfolder or what would be the best option to implement such usecase?
Thanks a lot
08-14-2018 11:12 AM
I would say no, smart folders are mostly static saved queries (there is no user input).
It seems that you need some form like advance search form, or even a custom dashlet. For simple searches, for example, based on the policy number field, you can also use Alfresco Full Search Text syntax in search box.
Search in fields | Alfresco Documentation
Regards.
--C.
08-15-2018 05:00 AM
What you can do with Smart Folders though is have a smart folder template which includes metadata / properties set on the folder node as query parameters. In the smart folder template you can use placeholders for these properties that are then replace at query time with the current property value on the folder. So if your "user input" is that they can change this metadata on the folder to which you have applied the smart folder template, then they can dynamically affect the query of the folder.
08-15-2018 06:05 AM
Thanks a lot Axel Faust , i think i got the exact solution for the problem. I will goahead and try-out this.
Another query is -
I assume that , i can dynamically set the meta-data to folder based on user input , but will be smart folder will get updated/refreshed automatically ? or Should i execute a script to do that ?
thansk a lot
08-15-2018 07:30 AM
When you change the metadata of the folder, the results of the query for the folder contents will change the next time the contents are requested. Depending on how you update the metadata, the UI may still show the contents based on the old data, so you might need to reload / refresh the UI to see the updated results.
08-15-2018 07:34 AM
Thanks a lot - Will follow this
08-17-2018 07:46 AM
Hi Axel Faust ,
What would be the right approach to override advance search option to set metatdata values to a folder ? I have customised advanced search option to show custom metadata .
When the user enter the values , i need to set this as part of folder meta-data.
thanks a lot
08-20-2018 09:17 AM
I am not sure I understand this one. Do you already have a different question thread open for this? Why would one want to set the search input for advanced search as metadata on a folder? If the folder matches the input (requirement for even showing up) there should be no need to set the values since they must already be present.
08-20-2018 09:34 AM
Hi Axel ,
thanks for the response !
I have customised advance search form to add my custom meta-data .
Next wat i am trying to do is : -
Set metadata values selected by user in advanced search form to Smart folder which i have defined . I am trying to achieve this when user click on Search button in advanced form.
User selected values from advanced form will be set to metadata of Smart-folder - ( Smart folder then execute query to fetch the list of documents from repo) ,
I am tryint to achive using code on_click of search button.
I was trying to override the ADVSearch_onSearchClick ,
please let me is this approach is right ? please let share a link which explain the overriding onSearchClick method .
Where i should add code to overrride ?
thanks a lot
Brijesh
08-15-2018 05:57 AM
thanks a lot for the respone , based on your anser another query poped-up as follows:-
Is it possible to show the metadata as parameter in search critiera using a dropdown - This will helps user to select specific metada from dropdown and enter values to execute search.
Explore our Alfresco products with the links below. Use labels to filter content by product module.