Custom search with multiple search parameters

0
Hi Experts,Hope you are doing goodI am trying to implemnent custom search functionality using multuple parameters of different datatypes like ( String ENUM etc. Also i need to give an optionto save search filters and also show all saved filters for future use.( PS. I am using datagrid 2 )Can you please advise steps to implement above solution?Thanks in advance for all support and suggestion.
asked
1 answers
2

Hi Malay Modi


1.Create a non-persistable entity SearchFilter_NPEone attribute per search field (String, Enum, etc.). Holds the current search.

2.Create a persistable entity SavedFiltersame attributes + a Name String, associated to the current user. Holds saved searches.

3. Add a Data View on SearchFilter_NPE above your grid, with input widgets (text box, enum drop-down, etc.).

4. Set Data Grid 2's data source to a microflow that takes SearchFilter_NPE as input.

5. In that microflow, Retrieve by XPath, constraining each field only if filled, e.g. [contains(Name, $SearchFilter/SearchString) or $SearchFilter/SearchString = empty] and [EnumAttr = $SearchFilter/EnumAttr or $SearchFilter/EnumAttr = empty].

6. Add a Search button that refreshes the NPE object to re-run the grid.

7. Add a Save button → popup for the filter name → microflow copies the NPE attribute values into a new SavedFilter, links it to the current user, and commits.

8. Add a list view or small Data Grid 2 retrieving SavedFilter for the current user.

9. Per row: an Apply button (microflow copies that SavedFilter's values back into the NPE, then refreshes the grid) and a Delete button.


I hope this helps

answered