Filter by associated objects

Hi, I am building a document platform. In my  domain model i have the document entity and a “tag” entity. These have a many many association. The tag entity has the attributes name and description. When uploading a document, the user can select existing tags and create new ones to be associated with the document.  When viewing all documents, I want to be able to filter by tags.  How can this be implemented?
1 answers

You could create a non-persistable entity with the search parameters you needed. 


Add that non-persistable entity in a dataview with a text box (or dropdown if you want) that allows the user to specify which tag they are searching for.


Nested within this dataview could be a data grid or list view that has it’s data retrieval method set to microflow. 


Create a microflow with one parameter, the non-persistable entity in the data view, and have it retrieve via XPath the documents that match what the user typed or selected in the non-persistable entity.


You can also add a button which will refresh the dataview so they can use the search bar multiple times without leaving the page and coming back in again.


Here’s an example:

The ‘PWSSearch’ is a non-persistable entity, the user types what they want to search into the box and the listview uses it’s data source microflow to retrieve the PWS_Visibility objects that match.

The data view for the PWSSearch uses a data source microflow to create the non-persistable object.