Hello,

I have an aggregate A that fetches data used to build a list group.  In each list item, I want to be able to use aggregate B to get other data where the filter is using an attribute of that list item.  So in the expression of my aggregate B filter I used AggregateA.List.Current.Entity.Attribute.  However, I find that it always uses the attribute from the first record returned in aggregate A, instead of using the record that iterates in the list group.

Is there a way I can achieve this?

Thanks

Hi Tony,

Is this Tradtional Web, Reactive Web or Mobile? What Widget do you use?

Kilian Hekhuis wrote:

Hi Tony,

Is this Tradtional Web, Reactive Web or Mobile? What Widget do you use?

Hi Kilian,

I using Outsystem 11 UI Reactive Web.  I'm using the list widget.


Spent few minutes working on this thinking that its easy but I just learned the it is not on React. Since we don't have input parameters on Data Actions, now I also wonder how can this be achieved.

Hi Tony,

would you object to using a webblock for the inner list ?  That's a way to do this kind of thing.

Just have a webblock with as input parameter whatever 'parent' attribute you need to filter the 'child' list, the parents list is retrieved with aggregate at webscreen level, the childs list is retrieved with aggregate at webblock level.  The webscreen has a list with 'parent' attributes and the webblock in it, the webblock has a list with 'child' attributes in it.

Dorine

Dorine Boudry wrote:

Hi Tony,

would you object to using a webblock for the inner list ?  That's a way to do this kind of thing.

Just have a webblock with as input parameter whatever 'parent' attribute you need to filter the 'child' list, the parents list is retrieved with aggregate at webscreen level, the childs list is retrieved with aggregate at webblock level.  The webscreen has a list with 'parent' attributes and the webblock in it, the webblock has a list with 'child' attributes in it.

Dorine

Worked on my end :)


Tony Lee wrote:

Hello,

I have an aggregate A that fetches data used to build a list group.  In each list item, I want to be able to use aggregate B to get other data where the filter is using an attribute of that list item.  So in the expression of my aggregate B filter I used AggregateA.List.Current.Entity.Attribute.  However, I find that it always uses the attribute from the first record returned in aggregate A, instead of using the record that iterates in the list group.

Is there a way I can achieve this?

Thanks

Hi Tony,

In addition to Dorine's answer I want to clear why it is not working here in your case.

Because for your aggregate B you are using AggregateA.List.Current.Entity.Attribute as filter and in this you are using current record from the list which is by default set to index zero. That is why you are getting data for only first record of aggregate A.

So I would also suggest you to follow Dorine's suggestion.