# GetText does not return the updated value after SetText

**URL:** <https://forums.unrealengine.com/t/gettext-does-not-return-the-updated-value-after-settext/1276732>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [August 29, 2023, 5:09pm UTC](https://forums.unrealengine.com/t/gettext-does-not-return-the-updated-value-after-settext/1276732 "2023-08-29T17:09:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silot](https://forums.unrealengine.com/u/Silot)\
**Post date:** [August 29, 2023, 5:09pm UTC](https://forums.unrealengine.com/t/gettext-does-not-return-the-updated-value-after-settext/1276732/1 "2023-08-29T17:09:43Z")

</div>

I create a button\_loud and I pass a default text like. Then I set a new value and subscribe to OnClick

```auto
TextForMyUI<localizes> : message = "T"
TileButton : button_loud = button_loud{DefaultText := TextForMyUI}
TileButton.SetText(SetMessage(ToString(Number)))
TileButton.OnClick().Subscribe(HandleTileButtonClick)

```

In the HandleTileButtonClick I try to access the Text of the button like

```auto
HandleTileButtonClick(Message: widget_message) : void =
        Print("Button Clicked")
        if(Button := button_loud[Message.Source]):
            Print(Button.GetText())

```

but it returns the DefaultText and not the Number I’m setting

Any ideas what I’m doing wrong?

SetTextMessage:

```auto
SetMessage<localizes>(MyMessage:string) : message = { "{MyMessage}" }

```

---

<div class="post-metadata">

**Author:** ![Silot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silot](https://forums.unrealengine.com/u/Silot)\
**Post date:** [August 29, 2023, 10:36pm UTC](https://forums.unrealengine.com/t/gettext-does-not-return-the-updated-value-after-settext/1276732/2 "2023-08-29T22:36:18Z")

</div>

I’ve decided to override Subscribe so I can pass extra parameters as described here [Wrapping Subscribe() to pass additional data to listeners | Uefn Code Snippet](https://dev.epicgames.com/community/snippets/d8k/fortnite-wrapping-subscribe-to-pass-additional-data-to-listeners) which is a better approach but the problem still exists with the other approach
