Pass a Value From One Aggregate From Another Aggregate

How to Pass a Value From One Aggregate From Another Aggregate

Hi Tamilarasan S,

Can you be more specific about what you are trying to achieve? 

Do you want to pass the top row column data to another aggregate filter condition? 

Do you want to pass the list of data from an aggregate to another aggregate's filter as in (in condition in SQL)

Or Are you trying to perform some kind of join or union? 



I have Some Values In TotalCountDaySum.And I want to Assign the same Value Of TotalCountDaySum In GetSalesById

Screenshot 2022-07-27 152513.png

Hi Tamilarasan S,

You don't need to have 2 separate Aggregrate in this case. I think this can be achieved with a single aggregate using joins & groups. Can you provide me with a sample Oml file or at least the entity diagram to replicate the same.

There are two ways to do this:

1- Use on after fetch to call the second aggregate.

2- Create another block, pass it the first aggregate data as an input. And set the on param change event to refresh the second aggregate.

The second method is especially helpful if you are trying to implement lazy loading concept where you fetch images/videos after fetching the light weight data.

Hi @Tamilarasan S 

 You can only use an aggregate and join the tables as shown in the example image.

Best regards


If second aggregate is depend on the value of first aggregate then do follow step

1. Create two aggregate.

2.First aggregate should be at start and its result should be filtered(like Id based value), because you are dealing with value from first to second aggregate.

3.Now, create on after fetch action to first aggregate.

4.second aggregate should be on demand and it will get refresh on action of first aggregate(onafterfetch).

5.Value of first aggregate should get involve in filter of second aggregate.

Hope this will help you..


Yogesh J

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.