Cascading Checkbox
Question

Hello,

I am trying to make a cascading checkbox filter for a product catalog.

I managed to make the categories work but not the subcategories.

I have a list of Category Accordions with a web block in its content to list all the sub categories.

I manage to pass the selected sub categories from the wb to the parent so i can query the products but every time i select fro manothercategory the proeviou one is overwrited by the new one

ServiceStudioS7bQXVxUju.png

mvp_badge
MVP
Solution

Hi Mircea,

I want to suggest one more approach for the mentioned use case along with the shared solution. As the sub-categories also has its record id, why not keep a track of the selected sub-category record ids in the parent scope for further operation?

I did a bit of change in the shared approach. Refer to the attached .oml file.

I hope this helps too!


Kind regards,

Benjith Sam

Cascadelist.oml

mvp_badge
MVP
Solution

Hi Mircea,

Try this one,

Hope this will work.

Regards,

Manish Jawla

Cascadelist.oml1.0.0O11.oml

Hello, so this is exactly what i wanted, only has a small bug

when you add and remove childs several times it happens the following.

mvp_badge
MVP
Solution

Hi Mircea,

I want to suggest one more approach for the mentioned use case along with the shared solution. As the sub-categories also has its record id, why not keep a track of the selected sub-category record ids in the parent scope for further operation?

I did a bit of change in the shared approach. Refer to the attached .oml file.

I hope this helps too!


Kind regards,

Benjith Sam

Cascadelist.oml

This was a much better solution after all.

Thank you both for the help :)


mvp_badge
MVP

You're welcome.. Glad to help you :)


Kind regards,

Benjith Sam

mvp_badge
MVP

Hi Avram,

Can you share the sample oml, so that we can analyze it.

Regards,

Manish Jawla

I cannot share the oml, what i am asking is what is the best aproach to get the result i asked above.

mvp_badge
MVP

Hi Mircea,

I have attached the sample .oml for you.

May be this help or let me know your use case in detail.

Please create the parent & child data for test this.

Hope it helps.

Thanks.

Manish Jawla

Cascadelist.oml

So everything you did here works perfectly

But i run into the same problem as i did on my side.


Once I select all 4 childred i want the list of all 4 children, and not individual for each parent

Like in the image bellow I want the result to be "1.1,1.2,2.1,2.2" and not what is shown there


mvp_badge
MVP

Hi Mircea,

I have attached another oml.

Please have a look.

Hope this helps.

Regards,

Manish Jawla

Cascadelist.oml

I am unable to publish this oml

"Foreign Module Error"


Your OutSystems subscription only allows uploading modules developed in your environment, or downloaded from the OutSystems Forge. To share this module with the community, upload it at http://www.outsystems.com/goto/forge.

mvp_badge
MVP
Solution

Hi Mircea,

Try this one,

Hope this will work.

Regards,

Manish Jawla

Cascadelist.oml1.0.0O11.oml

Hello, so this is exactly what i wanted, only has a small bug

when you add and remove childs several times it happens the following.

mvp_badge
MVP
Solution

Hi Mircea,

I want to suggest one more approach for the mentioned use case along with the shared solution. As the sub-categories also has its record id, why not keep a track of the selected sub-category record ids in the parent scope for further operation?

I did a bit of change in the shared approach. Refer to the attached .oml file.

I hope this helps too!


Kind regards,

Benjith Sam

Cascadelist.oml

This was a much better solution after all.

Thank you both for the help :)


mvp_badge
MVP

You're welcome.. Glad to help you :)


Kind regards,

Benjith Sam

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