47
Views
12
Comments
Solved
List items filtered based on header (accordion)

Hi all,

I'm just getting started and I'm struggling a bit with the aggregate/filters. 

Here's my problem :

I have an entity containing Meeting types, and another one containing the dates of the different meetings per meeting types. My data, when joined into an aggregate, looks basically like :

Meeting A - 01.01.2020

Meeting A - 15.01.2020

Meeting B - 03.01.2020 


I'm simply trying to have a list containing accordions. The list contains the meeting types (so, A and B in the above example) and expanding the accordion should display the dates for this meeting type only. At the moment, expanding my accordion shows all the dates irrespective of the meeting type at the header of said accordion line.

I assume that the answer is either on the aggregate filter for the accordion items, or directly by tweaking the expression that defines the source for the second list (list used at the level of the accordion items), but can't make it work so far.

Could you guys share some thoughts on how to proceed ? 

Thanks !

mvp_badge
MVP
Rank: #91
Solution

Hi Daim,

After understanding your requirement and referring the shared .oml file, below are the steps which I would follow to achieve the requirement

Check this: Schedule Meeting Application


Steps:

1) Introduce a Block (let's call it - MeetingSessionBlock)

        - MeetingTypeId (as input Parameter)

        - Data Source as Aggregate: Source Entity MeetingSession filtered by  MeetingTypeId (input parameter)

2) Encapsulate the Meeting Session Date info List within the newly introduced block

3) Refer the same block within the Parent Screen, Inside the accordion List passing the MeetingTypeId as the input parameter to the block.


PFA - includes the updated .oml solution file


Hope this helps you!


Regards,

Benjith Sam

MeetingTest.oml

As I understand it, you have an aggregate that has a column saying the type of meeting and another column with the date, do I understand correctly?

And you want to filter only by the type of meeting?

Got it?

If this is the case, then you just have to put: Meeting type column like "Meeting A"



A more foolish solution, but it also depends on what you want to do, is after the aggregate to make a ListFilter.

Cheers

Rank: #390

Hi Daim,

As i understand , your requirement is like below image. 

 

Check this :  Sample screen

I have inculde the .oap solution,

Hope this helps u .


Thanks, 

AccordianTest.oap

mvp_badge
MVP
Rank: #68

Hello Daim.


Regarding the components, are you working in Reactive Web? This sample is Tradicional.


Having one or two entities is not relevant. Your source query must use both entities instead of one.

Rank: #49343

Hi guys,

Thanks for the help - I indeed use the reactive web mode, which is also probably why I can't find the "Preparation" step you use on your webblock. 

Please find the oml attached to give you a better view on the problem I'm facing

MeetingTest.oml

mvp_badge
MVP
Rank: #91
Solution

Hi Daim,

After understanding your requirement and referring the shared .oml file, below are the steps which I would follow to achieve the requirement

Check this: Schedule Meeting Application


Steps:

1) Introduce a Block (let's call it - MeetingSessionBlock)

        - MeetingTypeId (as input Parameter)

        - Data Source as Aggregate: Source Entity MeetingSession filtered by  MeetingTypeId (input parameter)

2) Encapsulate the Meeting Session Date info List within the newly introduced block

3) Refer the same block within the Parent Screen, Inside the accordion List passing the MeetingTypeId as the input parameter to the block.


PFA - includes the updated .oml solution file


Hope this helps you!


Regards,

Benjith Sam

MeetingTest.oml

Rank: #49343

Thanks everyone for the great help - works like a charm !

Benjith Sam, one question on the solution provided : what's the use of the OnParametersChange action ? I replicated the steps as per your instructions and noticed that it does not seem to have an effect on whether or not the functionality works