I am prototyping a table which contains the following labels:
I want to be able to set a String variable to be the value of the text that I click. For example, if I click on Name1, the variable is set to be “Name1”.
I have to set the click event per label and manually set the value to set the variable to. For example, upon click of the Name1 label, I have to manually set the string to be “Name1”.
This is very manual. If I have a long list of names, and will have multiple tables in different screens, this will take more time than seems necessary.
I want to be able to create a generic prototype function that refers to the text value of the label rather than explicitly having to manually define the text string. For example, in programmatic terms, this function would be something like variable=clickedItem.text.