Dynmic component getId

then get id of the clicked component and by using the block replace the text , convert the clicked component id into image id and then get value of the image id

also you can go through this blocks

converting clickable component id into required component id and get value of the required dynamic component id