Filtering a List of Dynamic Cards With Inconsistent Result/Outcome

I am making filtering feature for my ticketing app. It will filter a list of dynamic cards based on input text by user in the filter area. The filter uses the ontextchange event of the text box. Here is the blocks for the filter:


Summary of what it does:

  • User input text for filter in tb_TicketListFilter
  • The input text will be stored in a variable and used in SELECT statement to find ticket title that has the same text pattern in it, and return the result of a list of record id of the matching title.
  • This list of id will then be used to create ticket cards in the vertical scroll arrangement.
  • If the user somehow clear the tb_TicketListFilter, all tickets cards will be visible.

However, things are not going as planned. And the issue is not consistent.


Issue: Tried to filter to view “VPN” ticket. But, upon typing “VP”, no tickets are visible


Issue: Tried to filter to view ticket with “conn”. But upon reaching the 4th letter “conn”, no tickets are visible.


Issue: Filtered tickets disappeared when keyboard is hidden, and reappeared if keyboard is visible.

However, I tried a few things to better understand the issue.

  1. SELECT statement issue?
    No. I have created log variable to store SELECT statement result. As per checking of the logs, all result returned is correct.

  2. Dynamic Cards not created?
    No, using the same log, i have checked using the Dynamic Card Component Built event. All the cards for the filter result are created.

  3. Dynamic Cards properties somehow become visible=false?
    No, using the same log, i have confirmed that the visible=true for all component.

Other blocks for reference:

This block will create dynamic components for each tickets and their respective swipeview component.

Extension used:
Dynamic Component 2.3.0 by yusufcihan
SwipeView by Sumit
SQLite Bennedum

I am posting seeking guidance from all :smiling_face_with_tear:

Hi dear,

It would be really helpful if you could also show what the other procedures you’re using actually do.

In the meantime, I’d suggest considering switching to RecyclerList.
If you have many elements, it can significantly improve user experience, otherwise the app might freeze while creating components.
You might lose swipe functionality, but the performance gain is definitely worth it.

Below I’m sharing a very simple project that uses the native SQL component along with RecyclerList.
If you need a more in-depth explanation, feel free to ask.

:warning: Be careful! when it starts, it creates a tickets table in the database and populates it with 100 items.


SQL_RL.aia (131.3 KB)

Happy :kodular:oding!

I apply the filter directly to the card text, and it works well for me.

Hi Alexandre,

Welcome to the Kodular community!

You can save a few blocks by doing it this way

Anyway, Lukman’s project is a bit more complex.
You’re filtering based on the component’s text, while he’s filtering data retrieved from SQL by matching the title.

Thanks for the tip; I’ll test it with the new blocks.

Hi. Tq for the suggestion. Will have a look into RecyclerList

However, I would actually stick to using Dynamic Component extension.

I have tried using the builtin dynamic card and dynamic label component and this problem didnt happen. And that kind of makes me wonder where did i do wrong.

Here, I attach the aia file for your viewing.

Test_Ticket.aia (199.9 KB)

To begin, select “Load sample Data” from the option menu.

Thank you.