Declare index to fetch records in a pagelist within another pagelist

There’s a class Work-YLLine and within that class there’s a pagelist called ItemType. ItemType pagelist is of class Data-ItemType. Within this ItemType pagelist there’s another pagelist called ToyType. ToyType pagelist is of class Data-ToyType.

I want to create the declare index for this ToyType pagelist. Can somebody give some suggestions plz?

@MadhumiM Hi,
In your declare index, you can set the Source page context as “.ItemTypeList().ToyTypeList()”, the Source page context class as the class of your ToyTypeList and you can use Top and Parent page to set properties in the indexing and mapping sections

@D.Jihed Thanks for the reply. Could you please tell how to give the Index class to write if possible with an example. I just gave as follows but it doesn’t work.

Index class to write : Index-Data-ToyType

@MadhumiM Pega can automatically create the declare index rule , index class and index table for this you need to expand the

Data model – Property – ItemType – ToyType

When you are at this level you can right the property(ies) and select “Optimize for reporting”, a wizard will start you just need to click on next.

@MadhumiM Hi,
I have added a screenshot of declare index configuration:
make sure that you have added pxInsIndexedKey, pxIndexPurpose (you can add other properties of index- class) as required keys in the index class that you have created.
All properties in the index class property of your declare index must be optimized.

@D.Jihed Thanks a lot. I achieved my Declare index successfully.