# String vs text prompt types

**URL:** <https://forum.odk-x.org/t/string-vs-text-prompt-types/1841>\
**Category:** Support\
**Tags:** odk-x-survey\
**Created:** [July 26, 2022, 3:20pm UTC](https://forum.odk-x.org/t/string-vs-text-prompt-types/1841 "2022-07-26T15:20:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tghoward](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/t/5fc32e/32.png) [@tghoward](https://forum.odk-x.org/u/tghoward)\
**Post date:** [July 26, 2022, 3:20pm UTC](https://forum.odk-x.org/t/string-vs-text-prompt-types/1841/1 "2022-07-26T15:20:35Z")

</div>

Hi all,  
I’m curious about when someone would choose string over text as field types, or vice versa. Here:

[https://docs.odk-x.org/xlsx-converter-reference/?highlight=constraint#survey-prompt-types](https://docs.odk-x.org/xlsx-converter-reference/?highlight=constraint#survey-prompt-types)

the definitions are circular:  
|string| Used to ask the user a question and allows them to enter a string.|  
|text| Used to ask the user a question and allows them to enter text.|

I can google how these types are typically defined, such as here:

> <https://stackoverflow.com/questions/46105840/what-is-the-difference-between-text-and-string>

But, other than deducing that `text` may allow formatting and such and `string` seems to be a more fundamental data type (in java at least), here we are defining a data type for storage in a table.

In what contexts (or use cases) might one choose one of these prompt types over the other?

Thanks in advance,  
Tim

---

<div class="post-metadata">

**Author:** ![elmps2018](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/elmps2018/32/105_2.png) [@elmps2018](https://forum.odk-x.org/u/elmps2018)\
**Post date:** [July 26, 2022, 3:47pm UTC](https://forum.odk-x.org/t/string-vs-text-prompt-types/1841/2 "2022-07-26T15:47:27Z")

</div>

Hi @tghoward this might be helpful: [ODK-X character limits](https://forum.odk-x.org/t/odk-x-character-limits/532)

---

<div class="post-metadata">

**Author:** ![tghoward](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/t/5fc32e/32.png) [@tghoward](https://forum.odk-x.org/u/tghoward)\
**Post date:** [July 26, 2022, 3:59pm UTC](https://forum.odk-x.org/t/string-vs-text-prompt-types/1841/3 "2022-07-26T15:59:19Z")

</div>

Hi @elmps2018. Ok, thank you, that’s a helpful exchange. So, perhaps the only differences (as used here by ODK-x) are character length, maybe. Especially since …

> [@ODK-X character limits](https://forum.odk-x.org/t/odk-x-character-limits/532/4):
>
> It seems to me that the text type is just another name for the string type - and the xlsx converter changes text types to string types.

Thanks for the reply.
