# Field value that is a combination of other fields values

**URL:** <https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054>\
**Category:** Database\
**Created:** [April 1, 2017, 8:54pm UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054 "2017-04-01T20:54:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![artemzheg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/artemzheg/32/9651_2.png) [@artemzheg](https://forum.bubble.io/u/artemzheg)\
**Post date:** [April 1, 2017, 8:54pm UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/1 "2017-04-01T20:54:02Z")

</div>

Hello, bubblers.  
Let’s imagine that we have a Thing called “User” with two fields: **Name** and **Surname** (both with type “Text)”.  
Now I want to make a third field called “ **Name+Surname** ” (I need it for Search Box element).

**Example** :

**_Name_** = “Andy”  
**_Surname_** = “Warhol”  
**_Name+Surname_** = “Andy Warhol”

Is it possible to realise? Can’t find any operations like “+” or “join”…

---

<div class="post-metadata">

**Author:** ![fayewatson](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fayewatson/32/2686_2.png) [@fayewatson](https://forum.bubble.io/u/fayewatson)\
**Post date:** [April 2, 2017, 3:50am UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/2 "2017-04-02T03:50:12Z")

</div>

Hey @artemzheg 🙂 To accomplish this for the search box element, I think you would need to create a new field under the User for the Name + Surname value in order for that to be the Field to Search.

Alternatively, you can have an input and a repeating group beneath which looks + functions similarly to the searchbox element. This would allow you to Do a Search for Users in the repeating group with the constraint “Any field contains Input’s value”. If a User typed in Andy or Warhol, Andy Warhol would be shown in the repeating group (along with any other dynamic data you place in the cell). If Users have a biography text field, and someone typed in ‘artist’, Andy Warhol would be displayed since that would be in his biography text field.

---

<div class="post-metadata">

**Author:** ![artemzheg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/artemzheg/32/9651_2.png) [@artemzheg](https://forum.bubble.io/u/artemzheg)\
**Post date:** [April 2, 2017, 8:59pm UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/3 "2017-04-02T20:59:07Z")

</div>

> [@fayewatson](#):
>
> Hey @artemzheg 🙂 To accomplish this for the search box element, I think you would need to create a new field under the User for the Name + Surname value in order for that to be the Field to Search.

Hi, @fayewatson. This is exactly what I would like to do. But I can’t find any operation for this (like “+”, ""join or “concatenation”):  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/099f25e9a7afeaceaef1ae44c2d398977bf10787.png)

---

<div class="post-metadata">

**Author:** ![fayewatson](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fayewatson/32/2686_2.png) [@fayewatson](https://forum.bubble.io/u/fayewatson)\
**Post date:** [April 3, 2017, 3:11am UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/4 "2017-04-03T03:11:05Z")

</div>

I would create a new field such as “Full Name” (type: text, list: no) and then the value would be:

Full Name = Input Name’s value Input Surname’s value

(Making sure there’s a space between Input Name’s value and Input Surname’s value). That should do it! 🙂

---

<div class="post-metadata">

**Author:** ![vladlarin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vladlarin/32/38367_2.png) [@vladlarin](https://forum.bubble.io/u/vladlarin)\
**Post date:** [April 3, 2017, 8:46am UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/5 "2017-04-03T08:46:58Z")

</div>

There’s another “hack” specifically for the cases when you need to format the input, but the standard inputs fields do not give you that option.

There is a function of conditional formatting of inputs in Bubble that you can use for this purpose.  
First, you need to find a condition that will always be = true.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/5/57b9a5f9ef24a24d14178b21c3e8cd90cb7f85c0.png)

Then you need to select "formatted as text:

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

And then, since the condition will always be True, you can use the proper multi-line input to concatenate values, and do much more.

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

 ![](https://us1.discourse-cdn.com/bubble/original/2X/4/42b959c386af3568e52408e81c47ea52300333fd.png)

Hope it helps!

Vlad.  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/a/a094af6019c87fd70dee668f1bcfb7d633f0ce56.png)

GM at Bubblewits - Bubble Certified Partner

> **[Zeroqode is a suite of no-code products and services for launching your ideas...](https://zeroqode.com)**
>
> No-code apps, plugins for Bubble, native apps builder and more. Now you can build apps without code even faster

[http://bubblestore.io](http://bubblestore.io) – a place to buy Bubble templates for landing pages, e-commerce, workflows, APIs etc.  
[http://iambubble.com](http://iambubble.com) - one page Bubble demo  
[http://builtonbubble.com](http://builtonbubble.com) - Collection of apps built on Bubble

---

<div class="post-metadata">

**Author:** ![artemzheg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/artemzheg/32/9651_2.png) [@artemzheg](https://forum.bubble.io/u/artemzheg)\
**Post date:** [April 3, 2017, 8:39pm UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/6 "2017-04-03T20:39:09Z")

</div>

Oh, I use such variant to display data from several fields in one element, but I didn’t think it will work for saving data in DB. Thank you 🙂

@vladlarin, thank you very much for this “bubble hack”, I’m sure I’ll use it for my apps!

---

<div class="post-metadata">

**Author:** ![romain.stasderichell](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@romain.stasderichell](https://forum.bubble.io/u/romain.stasderichell)\
**Post date:** [July 29, 2021, 10:09am UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/7 "2021-07-29T10:09:12Z")

</div>

Hi, I tried everything I could but I can’t add the space. It just disappears as soon as I start selecting the next field from the dynamic picker and in the end I don’t have any space between any of my fields. How can I do to keep the space? Thank you for your help 🙂

---

<div class="post-metadata">

**Author:** ![falecom1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/falecom1/32/86559_2.png) [@falecom1](https://forum.bubble.io/u/falecom1)\
**Post date:** [May 23, 2022, 8:41pm UTC](https://forum.bubble.io/t/field-value-that-is-a-combination-of-other-fields-values/12054/8 "2022-05-23T20:41:47Z")

</div>

I’ve came to this topic looking for solution to a different problem, but the answer here inspired me to get a different workaround.  
I have a API call that gets several address parameters, such as street, number, complement, neighborhood, city, state and ZIP code.  
What I’m trying to get is something like:

{Street} n. {Number}, {Complement} - {Neighborhood} - {City} – {State}, {Zip code}

The thing is that sometimes the record I’m getting doesn’t have one or more of these parameters, and that would leave me with unwanted spaces between each information piece. I’ve tried to use the hack suggested here, but couldn’t make it to work, so I came up with a solution using Regex.

So, for the field value I’ve just used _Arbitrary text_  
 ![Screen Shot 2022-05-23 at 17.37.00](https://us1.discourse-cdn.com/bubble/original/3X/9/5/955d803a1dab0c7819cea30e67c890d7776f032c.png)

And concatenated every piece of data that I need, with a :find and replace attached to it  
 ![Screen Shot 2022-05-23 at 17.37.15](https://us1.discourse-cdn.com/bubble/original/3X/9/c/9c3d6fd42b95c99ab2c672f8baf3c35a9e5be813.png)

Then, is just a matter of search for everything on each piece of data (thats the “(.+)” regex code, that literally gets everything and puts into a group) and replace it (thats the “$1”, that represents the first group of returned data) with the spaces, dashes, commas and everything I need to keep the formatting I need for the whole string.  
 ![Screen Shot 2022-05-23 at 17.37.25](https://us1.discourse-cdn.com/bubble/original/3X/6/8/68ed49658e93a1b8b789306b9c866c3de3f8083e.png)

Hope it inspires more solutions!
