How can I get to know which card has been clicked?

I’ve used 50+ card views in my app as buttons. I want that whenever a user clicks on any card view, I get to know that which card has been clicked and I can consequently trigger the required blocks. If I use When(CardViewName).Click block for each card, then there will be huge number of blocks. So, is there any method to solve my purpose without using huge number of blocks?
Thanks in advance!

Use Any component and When any Card View.Click block or you can use dynamic components extension by @yusufcihan and create those 50+ cardviews dynamically

Actually, I’ve already created those card views. There is one image and label in each card. Like this:

So, I want that when a user clicks on the card view, the text of the label becomes the start value in this block:


Show me your blocks how you create them dynamically or not ?

If not created dynamically, one way is to set each cardview full clickable, use lists of components and …

or set label clickable and

1 Like

It seems this is going to work for me. I’ll try these blocks and will let you know.
Thanks! @dora_paz

Alternatively, you can also use the dictionary.
The card views as the key and the respective labels as the value.

Might reduce a few blocks? :thinking:

1 Like

Thanks a lot @dora_paz. I got my purpose solved using the blocks suggested by you.
Have a great time ahead!

1 Like

Thanks to you too @Alaqmar_Bohori. As suggested by you, I used dictionary instead of lists and I suppose that the number of blocks were reduced. :smiley:
Have a great time!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.