# \#setvariablevalue

**URL:** https://tech-community.robotics.abb.com/tag/setvariablevalue/1361.md

[Latest](https://tech-community.robotics.abb.com/latest.md) · [Categories](https://tech-community.robotics.abb.com/categories.md) · [Tags](https://tech-community.robotics.abb.com/tags.md)

---

## [Controller switches to automatic mode when executing API.RAPID.setVariableValue](https://tech-community.robotics.abb.com/t/controller-switches-to-automatic-mode-when-executing-api-rapid-setvariablevalue/11859)

<div class="topic-metadata">

**Author:** [@Polyblank](https://tech-community.robotics.abb.com/u/Polyblank)\
**Replies:** 3\
**Last updated:** [April 29, 2025, 2:00am UTC](https://tech-community.robotics.abb.com/t/controller-switches-to-automatic-mode-when-executing-api-rapid-setvariablevalue/11859 "2025-04-29T02:00:40Z")

</div>

I tried to change the value of a RAPID variable in an user defined function in AppStudio like so: In UI designer a TComponents.Select with the Option content text1|var1; text2|var2; was created. On the onChange event…
