If you set the string variable equal to the identifier of the component, you will not be able to access any properties, because now it is a string, not an object. How do you set a string variable? You need to access the component itself, and setting the identifier to the string will fail. You should set the property using the object itself, not a string representation of its identifier. Paste your code if you want me to take a look.
To set the component property itself, the syntax is myComponent.myProperty = myValue
To get the value myValue = myComponent.myProperty
source
share