@devgianart
In the PowerApps menu by pressing File -> settings
there is a list of experimental features. One of those is Behavioral components. This one needs to be activated by pressing the side.
You cannot directly use app specific code such as a Set(variable, set_to) in a component.
In order to make this working you need to add an input on the component, this can be a text but should be a behavior (only visable after change settings). Then in the OnSelect you want to call the input. Therefore you enter the component name followed by a . and the input name, it will look something like this: Component1.BehaviorInput.Text
don’t quote me on the .Text, that’s something I’ve to check.
once on the screen side of the app you use the component and fill in on the input of the component Set(variable, set_to).
I hope I’ve made it a bit clearer, I’ve you have any further questions please let me know.
kind regards