How To Union In scuh cases

How To Union In scuh cases

  

Hi

1.Does anyone has idea how to achieve this in preparation?


2).My another question is that in preparation a set of predefined criteria is used to search data in order to show to user.However if user want to see data which is not available in the predefined, he can perform custom search.

I know this is doable but how to do this with navigation?How to bind the navigation when the page load and custom is different thing.


Help !!Please!!


Johnson Lim wrote:

Hi

1.Does anyone has idea how to achieve this in preparation?


2).My another question is that in preparation a set of predefined criteria is used to search data in order to show to user.However if user want to see data which is not available in the predefined, he can perform custom search.

I know this is doable but how to do this with navigation?How to bind the navigation when the page load and custom is different thing.


Help !!Please!!


Hi Johnson,

Regarding your first question, maybe you need to use ListAppendAll action which you can find on System eSpace. Please note that you should use the same structure between aggregates. When I need to union many results I use an Advance Query with "Union" because it's easy to control the result and do it all with a query.

Regards.

Solution

Hello Johnson,

If you want to retrieve data from an aggregate and, at the same time, provide the user with the ability to filter the information, you need to use FILTERS in aggregate, associated with local/session variables and set the filter to use them, to filter data, or ignore them if the values are not set (that will be the case, usually, on page load).

Also, it is VERY inneficient to try to join aggregate outputs in logic.
Prefer to do a single aggregate and fetch all the data at once.

You can do something like this, in the same aggregate. Assume you have the folowing fields to filter: Name (string), Age (integer), TypeId (Static Entity Identifier)

Add 3 filters to the aggregate and set them like this:

Filter 1: Entity1.Name like "%"  + Session.SearchByName + "%"

Filter 2: Session.Age < 0 or Entity1.Age = Session.Age

Filter 3: Session.TypeId = NullIdentifier() or Entity1.TypeId = Session.TypeId

In the RED, if the condiition is true, than does not matter if the following condition will be true or not, for all the records this filter will be true.

When the user wants to filter, he chose the options and press a "search" button, that calls an action that refresh the aggregate and refresh the visual elements in the page that shows the results.

Cheers,
Eduardo Jauch

Solution

Thanks Eduardo and Joao