# How to check if Text value is an Integer?

**URL:** <https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895>\
**Category:** UI\
**Tags:** branch, text, integer, check, unreal-engine, Widget, question\
**Created:** [April 14, 2017, 6:37am UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895 "2017-04-14T06:37:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hypersapien](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hypersapien](https://forums.unrealengine.com/u/hypersapien)\
**Post date:** [April 14, 2017, 6:37am UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/1 "2017-04-14T06:37:52Z")

</div>

So I have a widget which contains a Text Box. The intention is for the player to edit the value in the Text Box, which will update an Integer value stored elsewhere. I’m finding my blueprint breaks if the player enters any value other than an integer (ie, “34a”). I’d like to add a branch into this blueprint which initially checks if the value the player entered is an integer or not. What is the proper way to check this?

---

<div class="post-metadata">

**Author:** ![Wurmloch83](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wurmloch83](https://forums.unrealengine.com/u/Wurmloch83)\
**Post date:** [April 14, 2017, 7:13am UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/2 "2017-04-14T07:13:24Z")

</div>

There is a function `IsNumeric` that takes a string argument and returns bool, So if you have a `text`, convert it to `string` and then call `IsNumeric`

Like this:

 ![134167-isnumeric.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/e/05e05cb2f4295b4cc5a3c23e2f0f45a719b0bc55.png)

---

<div class="post-metadata">

**Author:** ![hypersapien](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hypersapien](https://forums.unrealengine.com/u/hypersapien)\
**Post date:** [April 14, 2017, 3:10pm UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/3 "2017-04-14T15:10:24Z")

</div>

Perfect, thanks! I suppose after the True pin, I’ll run my result through a Truncate or something to insure I’m not working with a Float. Thanks for your help =)

---

<div class="post-metadata">

**Author:** ![hypersapien](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hypersapien](https://forums.unrealengine.com/u/hypersapien)\
**Post date:** [April 14, 2017, 3:11pm UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/4 "2017-04-14T15:11:35Z")

</div>

Second question though, how did you format your text so that IsNumeric and Text stand out like that?

---

<div class="post-metadata">

**Author:** ![Wurmloch83](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wurmloch83](https://forums.unrealengine.com/u/Wurmloch83)\
**Post date:** [April 14, 2017, 3:16pm UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/5 "2017-04-14T15:16:51Z")

</div>

I put it into `backticks` (this character: `)  
Or simply mark the word and click the 101010 button.

---

<div class="post-metadata">

**Author:** ![hypersapien](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hypersapien](https://forums.unrealengine.com/u/hypersapien)\
**Post date:** [April 14, 2017, 3:50pm UTC](https://forums.unrealengine.com/t/how-to-check-if-text-value-is-an-integer/390895/6 "2017-04-14T15:50:55Z")

</div>

`test`

This is another `test`

Thanks =)
