# Referencing a text return

**URL:** <https://forum.bubble.io/t/referencing-a-text-return/329613>\
**Category:** Need help\
**Created:** [July 4, 2024, 3:16am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613 "2024-07-04T03:16:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.bm.andrews](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@benjamin.bm.andrews](https://forum.bubble.io/u/benjamin.bm.andrews)\
**Post date:** [July 4, 2024, 3:16am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613/1 "2024-07-04T03:16:55Z")

</div>

![image](https://us1.discourse-cdn.com/bubble/original/3X/a/1/a1252b45fa26d2e9fe64277fa322192e403cc94d.png)

Can someone tell me how I would reference the returned value of this expression so I can use it in a workflow, like I want to say name = this reference.

---

<div class="post-metadata">

**Author:** ![geesonofgee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/geesonofgee/32/222432_2.png) [@geesonofgee](https://forum.bubble.io/u/geesonofgee)\
**Post date:** [July 4, 2024, 5:07am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613/2 "2024-07-04T05:07:10Z")

</div>

I think you can use an input element instead of text, make the initial content of the input be that dynamic expression.  
Then in your workflow you’ll reference the value of the input

---

<div class="post-metadata">

**Author:** ![GaryIreland](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@GaryIreland](https://forum.bubble.io/u/GaryIreland)\
**Post date:** [July 4, 2024, 5:13am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613/3 "2024-07-04T05:13:39Z")

</div>

if it’s in the same workflow you can find it under result of step (1,2, whatever)'s ingredient. If you want to log it in the client for later use make a custom state on any page element called “ingredient” and then in the workflow do name=page element’s ingredient’s name.

EDIT: I hadn’t picked up on this just being a text element on the page and not part of a workflow already. You can just do that same search at any point inside a workflow. Or best practice imo, make the aforementioned custom state and have a page load workflow with your expression that fills it. then no more searches you just keep referencing that custom state.

ps. do you really have a field on the ingredient data type that’s also called ingredient?

---

<div class="post-metadata">

**Author:** ![shahidalikhan5ish](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@shahidalikhan5ish](https://forum.bubble.io/u/shahidalikhan5ish)\
**Post date:** [July 4, 2024, 5:22am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613/4 "2024-07-04T05:22:17Z")

</div>

You can reference the returned value by storing it in a state or a custom state in Bubble. Then use that state in your workflow actions where you need to reference the value.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [September 12, 2024, 3:17am UTC](https://forum.bubble.io/t/referencing-a-text-return/329613/5 "2024-09-12T03:17:52Z")

</div>

Closed on September 12, 2024, 3:17am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
