# Creating an Expression

**URL:** <https://forum.bubble.io/t/creating-an-expression/42561>\
**Category:** Need help\
**Created:** [November 16, 2018, 10:45pm UTC](https://forum.bubble.io/t/creating-an-expression/42561 "2018-11-16T22:45:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpsalaza](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mpsalaza](https://forum.bubble.io/u/mpsalaza)\
**Post date:** [November 16, 2018, 10:45pm UTC](https://forum.bubble.io/t/creating-an-expression/42561/1 "2018-11-16T22:45:34Z")

</div>

I’m trying to do the same example in this video [Videos | Bubble](https://bubble.io/videos) but the step shown in min 4:13 doesn’t work the same for me as it does in the video. it requires me to continue writing the expression, but I’m not quite sure what it is I need to add for it to be complete.

 ![16%20PM](https://us1.discourse-cdn.com/bubble/original/3X/4/3/43e44365cdc736421fbeef265991fcb6c5e847bd.png)

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [November 17, 2018, 12:13am UTC](https://forum.bubble.io/t/creating-an-expression/42561/2 "2018-11-17T00:13:38Z")

</div>

Wow… Umm, OK. First: You’ve created a custom data type called “Text”!?

While Bubble will let you do that, this is kind of a bad idea as that’s so close to the primitive type “text”. This can only cause confusion down the road. (And it caused me confusion when I saw your screencap.)

What do these objects represent… SMS Text Messages or something? (It would be better to call them that. Data types are easy enough to rename.) But anyway, let’s get on with it.

Your search constraint doesn’t make any sense. What you seem trying to do is filter by a field on your “Text” object called “Unit Price.”

I would GUESS that you have Unit Price defined as a **number**.

And then you’re telling Bubble: Only return “Texts” where the Text object’s Unit Price is… The value of an Input field that seems to be for collecting the name of a Country.

(Which of course sounds like a hatful of crazy, because it is.)

The value in the **Input** element is probably of type **text** (the _primitive_ type text, not your custom type Text).

There’s a data type mismatch there. The reason there is a (More…) is that Bubble is assuming that perhaps you will do some other operation on the text to turn it into a number. For example, while I’m sure _you_ aren’t trying to do this, text operators _can_ return numeric values. For example, if Input Type Country’s value is in fact of type text:

`Input Type Country's value:number of characters`

… would return a number. (The number of characters in the input’s text 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:** [January 25, 2019, 10:49pm UTC](https://forum.bubble.io/t/creating-an-expression/42561/3 "2019-01-25T22:49:44Z")

</div>

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