# Generate random string only text type

**URL:** <https://forum.bubble.io/t/generate-random-string-only-text-type/5554>\
**Category:** Need help\
**Created:** [August 29, 2016, 7:42am UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554 "2016-08-29T07:42:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nomadkelley](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nomadkelley/32/4986_2.png) [@nomadkelley](https://forum.bubble.io/u/nomadkelley)\
**Post date:** [August 29, 2016, 7:42am UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/1 "2016-08-29T07:42:42Z")

</div>

Error goes away when I assign it to a text type.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/c515b9bf24cc5301767defdaede9ec207fd6c33a.png)

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 29, 2016, 6:38pm UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/2 "2016-08-29T18:38:39Z")

</div>

This is a not a random number generator, but a random string. So it’s a text. You can’t use it as a number.

---

<div class="post-metadata">

**Author:** ![ryan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ryan/32/1707_2.png) [@ryan](https://forum.bubble.io/u/ryan)\
**Post date:** [August 29, 2016, 6:57pm UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/3 "2016-08-29T18:57:32Z")

</div>

You can run it through an Input Field though to convert it to a number, then in the workflow get the number from that Input Field.

I hide away the Input Field so someone can’t see it, but use it for conversion between data types.

---

<div class="post-metadata">

**Author:** ![nomadkelley](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/nomadkelley/32/4986_2.png) [@nomadkelley](https://forum.bubble.io/u/nomadkelley)\
**Post date:** [August 29, 2016, 7:03pm UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/4 "2016-08-29T19:03:51Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![caeroa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/caeroa/32/9696_2.png) [@caeroa](https://forum.bubble.io/u/caeroa)\
**Post date:** [June 28, 2017, 12:35am UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/5 "2017-06-28T00:35:13Z")

</div>

I believe this the best workaround I have seen in bubble so far: Text -\> Number  
I am using it, it is not 100% accurate, it has a rate of about I would say 75%  
But it is something you can work with.

---

<div class="post-metadata">

**Author:** ![caeroa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/caeroa/32/9696_2.png) [@caeroa](https://forum.bubble.io/u/caeroa)\
**Post date:** [June 28, 2017, 3:31am UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/6 "2017-06-28T03:31:10Z")

</div>

I am sorry guys, it works perfectly, I had a little problem in my Workflow, but now it is perfect.

---

<div class="post-metadata">

**Author:** ![ryan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ryan/32/1707_2.png) [@ryan](https://forum.bubble.io/u/ryan)\
**Post date:** [June 29, 2017, 7:44pm UTC](https://forum.bubble.io/t/generate-random-string-only-text-type/5554/7 "2017-06-29T19:44:16Z")

</div>

This is quite late, but you may want to check if the number has been used before so you don’t accidentally create a duplicate, if you haven’t already implemented this.
