# How to connect two databases?

**URL:** <https://forum.bubble.io/t/how-to-connect-two-databases/226263>\
**Category:** Need help\
**Created:** [September 29, 2022, 10:31am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263 "2022-09-29T10:31:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [September 29, 2022, 10:31am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/1 "2022-09-29T10:31:13Z")

</div>

Hi all. Could you tell me how the two data types are related to each other? There is a hotel website with a list of all the rooms that are stored in the Rooms database. Each room has a category. The problem arises when the user makes a new entry in the Rooms database, that is, creates a new room.  
I have a dropdown that displays room categories from the corresponding database. The user selects the category of the room and by pressing the button in the Rooms database, the data that he entered should be recorded. All data is recorded correctly, except for the room category, which is not recorded at all. What could be the problem? Thanks

Data base type Rooms

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/7/e784d4b8dfa7057429cd48c257f00f6aa30ddb12.png)

Data base type Category

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/8/680f86ad82020b3a528201e07b7e85fef15b318d.png)

Workflow for button Create  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/1/418cb9af600180448c90f5432fcf66ea44bd0ec1.png)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [September 29, 2022, 10:38am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/2 "2022-09-29T10:38:29Z")

</div>

Hi there, @bluesun440… if I understand your post correctly, shouldn’t you be setting the category to the value that was selected in the category dropdown instead of `Parent group's Room's category` (which doesn’t make sense, to me at least, because you are creating a new room, so what would the parent group’s room’s category be)?

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [September 29, 2022, 10:41am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/3 "2022-09-29T10:41:10Z")

</div>

Yep, as @mikeloc points out, you can’t set the Category field to the parent group’s room’s category… as there isn’t a parent group room (you haven’t created it yet)… or if there _is_ a parent group room then it must be a different room (it can’t be the one that doesn’t exist yet), so the value will be incorrect anyway…

The Room Category should be set to the dropdown’s value.

---

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [September 29, 2022, 10:59am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/4 "2022-09-29T10:59:53Z")

</div>

@adamhholmes @mikeloc

Very silly mistake. This because I created custom dropdown, and set custom state. And I should send in data base datas from this custom state. Thank you so much. It’s working correctly now

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

---

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [September 29, 2022, 5:18pm UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/5 "2022-09-29T17:18:51Z")

</div>

Sorry, could you clarify one more question. I did not start a new topic, because I suspect that this is also a rookie mistake question.  
I’m trying to change data in a repeating group, via an input field. However, when I build a workflow, and indicate that I need to change the data in a certain row, an error appears. I looked at examples on the Internet, according to them I do everything correctly. Moreover, the value changes in the cell, but remains the same in the database. Thank you

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/c/bc3165cfe427927e599199a97290942a16c0e3a0.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/1/91af343e32d0c52e4161de791a068338bd560cb1.png)

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

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

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [September 29, 2022, 6:55pm UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/6 "2022-09-29T18:55:27Z")

</div>

What does the issue checker say the issue is? Are the field type of the `price` field and the content type of the input element the same?

---

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [September 29, 2022, 7:38pm UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/7 "2022-09-29T19:38:20Z")

</div>

that was exactly the problem. The type of the input field and the price field in the database were different. 🤦‍♂️ Thanks a lot

---

<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:** [December 8, 2022, 10:32am UTC](https://forum.bubble.io/t/how-to-connect-two-databases/226263/8 "2022-12-08T10:32:00Z")

</div>

Closed on December 8, 2022, 10:32am UTC

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