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 !

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

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, 

Miguel Verdasca wrote:

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

Hi Miguel,

Indeed, you got it right - thanks for the details on how to proceed. From your screenshot this looks like a logic flow but I didn't see how to link actions to aggregate in the training path - could you advise on how to create to link an action to an aggregate and how to trigger it ? 

Thank you



Rahul Kumar wrote:

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, 

Hi Rahul,

That's spot on, thanks. As per my previous reply to Miguel, I'll deep dive to fully understand how this was achieved 


Daim wrote:

Rahul Kumar wrote:

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, 

Hi Rahul,

That's spot on, thanks. As per my previous reply to Miguel, I'll deep dive to fully understand how this was achieved 


Hi Rahul Kumar 

I checked the .oap and have couple of questions

- You seem to have more widgets than I do. I don't see "List records", "combo box" and others in my project - is there something I need to do to have more widgets at my disposal ?

- Your solution is based on one single entity which contains both the meeting type and the date, whereas my scenario has one "main" entity to contain the meeting types, and another one which lists the actual sessions (= date), with a one-to-many relationship, could you advise on how to adapt the logic accordingly ? 


Thanks 


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.

Daim wrote:

Daim wrote:

Rahul Kumar wrote:

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, 

Hi Rahul,

That's spot on, thanks. As per my previous reply to Miguel, I'll deep dive to fully understand how this was achieved 


Hi Rahul Kumar 

I checked the .oap and have couple of questions

- You seem to have more widgets than I do. I don't see "List records", "combo box" and others in my project - is there something I need to do to have more widgets at my disposal ?

- Your solution is based on one single entity which contains both the meeting type and the date, whereas my scenario has one "main" entity to contain the meeting types, and another one which lists the actual sessions (= date), with a one-to-many relationship, could you advise on how to adapt the logic accordingly ? 


Thanks 


Hi , 

-You can apply same approach that i share with you . If you have two Entities with one-to-many relationship ,it's not a issue because you can apply joins in your aggregate.


- i used web block that is reusable widget. It have input parameter Meeting name , that help you to get list of data according to current meeting Name.

It's a better if you share your .oml . So that we can find solution according to your app. 


Thanks and Regards.

Rahul Kr.


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

Daim wrote:

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

Hi ,

I have applied my approach. It may help . But i can not check it because i m not configured SAML authentication . 

You can test it now in your environment. 

Thanks


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

Solution

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


Daim wrote:

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

Hi Daim,

Yes, you are absolutely correct, in this particular requirement the OnParametersChange event handler is not required (if you avoid defining the OnParametersChange handler for a block which is having a input parameter , the block will keep showing a warning message). 

But as you know, the block is a re-usable UI component and it can be instantiated within any of the screen/block, to achieve certain use-case and their might be a possibility that on the change of the block's input parameter value you would require to refresh the List data within the block, so in that case you will have to define the OnParametersChange handler.

Conclusion: Defining the block OnParametersChange handler, is based on your requirement and implementation.


You're welcome, Daim :)


Regards,

Benjith Sam