Chirubot
(Bot)
November 18, 2020, 4:46am
#1
Hi Koders,
I was making an To Do App where I wanted to get text of a List of label (To Do things) and I want to copy it, when another Label is clicked.
I tried several options but did not work.
This is one of the options I tried.
But I got the below Error
Can anyone help me with this?
1 Like
Chirubot
(Bot)
November 18, 2020, 5:58am
#3
@luv.ak.tech
I took the reference of the below
Refer this aia for how to set blocks for click event for each dynamically created list item.
DynamicComponents.aia (330.9 KB)
[blocks (5)]
This block shows the name of list item (Title) in the Notifier with respect to the selected list item.
and
That error is because of label id is not set properly in any card view click block.
In any card view click block, get id returns card view id which contains “Card”. To use this id for label replace the Card from get id block.
[IMG_20201016_230415]
Here use, Replace all text with segment block
Set segment to string “Card”
and replacement to blank string.
iamwsumit
(Sumit Kumar)
November 18, 2020, 6:42am
#5
This error coming because the component that u are using to take text has not created
1 Like
Chirubot
(Bot)
November 18, 2020, 7:00am
#7
luv.ak.tech:
@luv.ak.tech
I have also tried this method.
When I click on the on the copy button it only gives the text of the copy button.
@iamwsumit
Blocks
Chirubot
(Bot)
November 18, 2020, 7:13am
#9
Did not Work,
It is still Copying the text on Copy Button which is content_copy
Hi,
Replace your second label (copy) with a button.
Chirubot
(Bot)
November 18, 2020, 7:39am
#11
Do you mean something like this
When I do it I get the same error.
What if I need buttons for another purpose like translate the text?
Is there no way to accomplish with the help of Labels?
Now try this: without using join block.
luv.ak.tech:
Try this -
iamwsumit
(Sumit Kumar)
November 18, 2020, 9:35am
#13
For which component do u want to copy the text
Chirubot
(Bot)
November 19, 2020, 10:08am
#14
Sorry @iamwsumit ,
I guess I had to elaborate it.
I created a new project as the old one was messed up and I made some changes.
In device
This is the design of my App. (Not Focused on the UI/UX yet)
In the Blocks
The List procedure
The Variables
Button Function
And Lastly the block which I want to get text when Clicked
I guess this understands my problem.
iamwsumit
(Sumit Kumar)
November 19, 2020, 10:10am
#15
First u need to check the the component is dynamic or not the if Id matches with that label that u want to copy the text then copy…
1 Like
iamwsumit
(Sumit Kumar)
November 19, 2020, 10:53am
#17
@dora_paz I think it will not work beacuse both component are same and u are setting sam eids to both
dora_paz
(Dora)
November 19, 2020, 11:30am
#18
For testing purposes I created 5 labels dynamically
When any label clicked, it copies the text of that label and it works for me
iamwsumit
(Sumit Kumar)
November 19, 2020, 11:34am
#19
beacuse u are creating only 1 label dynamically
and as u can see get property u can directly use get component variable but u are using get component block and get id block
1 Like
dora_paz
(Dora)
November 19, 2020, 11:46am
#20
You are right works also like this