# Change data from user B in database, while logged in as user A

**URL:** <https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356>\
**Category:** Database\
**Created:** [May 31, 2023, 11:08am UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356 "2023-05-31T11:08:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthur.schepers](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@arthur.schepers](https://forum.bubble.io/u/arthur.schepers)\
**Post date:** [May 31, 2023, 11:08am UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/1 "2023-05-31T11:08:59Z")

</div>

Hi there, i’m very new to Bubble.

I currently own a socialmedia management agency, and i’m working on a platform where my clients can approve or deny future posts. I’m now working on the admin panel of it, where I can add useful information to client accounts such as # posts per week, what platforms to post on etc.

However, this is where I’m stuck. I can’t seem to setup a workflow where the input of the text boxes get filled in in the correct fields. I tried using constraints based on business name but nothing seems to work.

This is what the “add customers” page looks like. The top input is “business name” so I thought I could use the value I fill in that field to place the additional information in the correct customers data.

 ![Screenshot 2023-05-31 at 13.08.03](https://us1.discourse-cdn.com/bubble/original/3X/6/4/64a2037cdf6868fcfe9d8cbd7f8d498f8b0f0bbf.png)

Help is much appreciated!

---

<div class="post-metadata">

**Author:** ![jason24](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jason24](https://forum.bubble.io/u/jason24)\
**Post date:** [May 31, 2023, 12:19pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/2 "2023-05-31T12:19:19Z")

</div>

Hello,  
So you need to pre-populate these fields from data that is already stored in your database?

---

<div class="post-metadata">

**Author:** ![arthur.schepers](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@arthur.schepers](https://forum.bubble.io/u/arthur.schepers)\
**Post date:** [May 31, 2023, 12:34pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/3 "2023-05-31T12:34:02Z")

</div>

Hi, thanks for your response! I need the data i fill into the input fields to be placed in the database, but for the right client.

 ![Screenshot 2023-05-31 at 14.32.34](https://us1.discourse-cdn.com/bubble/original/3X/e/5/e5fe47500cb689012ebba9882140810cb73e1d40.png)

So for example aaa is a customer but you can see that some data is empty, the input from the fields should be placed there.

---

<div class="post-metadata">

**Author:** ![jason24](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jason24](https://forum.bubble.io/u/jason24)\
**Post date:** [May 31, 2023, 12:43pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/4 "2023-05-31T12:43:26Z")

</div>

So you firstly need to search for the client and then show inputs for any missing information?

---

<div class="post-metadata">

**Author:** ![arthur.schepers](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@arthur.schepers](https://forum.bubble.io/u/arthur.schepers)\
**Post date:** [May 31, 2023, 2:07pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/5 "2023-05-31T14:07:14Z")

</div>

Yep! that’s right

---

<div class="post-metadata">

**Author:** ![jason24](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jason24](https://forum.bubble.io/u/jason24)\
**Post date:** [May 31, 2023, 2:13pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/6 "2023-05-31T14:13:32Z")

</div>

Create a text box at the top to input business name

In the default value for each text box below:  
do a search for select the correct table, and then select business = business input field value  
then :last items (and then the field you want o pull data from to show)

Does that make sense

---

<div class="post-metadata">

**Author:** ![arthur.schepers](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@arthur.schepers](https://forum.bubble.io/u/arthur.schepers)\
**Post date:** [May 31, 2023, 2:26pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/7 "2023-05-31T14:26:18Z")

</div>

That makes sense but I kind of need it the other way around, unless I’m mistaken.

So the inputs need to be placed in the correct field in the database.  
For example:

I’m user A and I’m on the admin panel.  
I fill in the information for user B on the page, and when pressing the submit button that information should be placed in the fields for user B in the database

---

<div class="post-metadata">

**Author:** ![jason24](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jason24](https://forum.bubble.io/u/jason24)\
**Post date:** [May 31, 2023, 2:46pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/8 "2023-05-31T14:46:47Z")

</div>

Once you have done the first step you would then have a submit button which would update the records with matching business name, if there is no matching business name you would create a new record, with both methods you then set each field to match each text input.

Without a bit more context this is the best I can suggest at the moment

---

<div class="post-metadata">

**Author:** ![arthur.schepers](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@arthur.schepers](https://forum.bubble.io/u/arthur.schepers)\
**Post date:** [June 1, 2023, 12:43pm UTC](https://forum.bubble.io/t/change-data-from-user-b-in-database-while-logged-in-as-user-a/265356/9 "2023-06-01T12:43:52Z")

</div>

I’ll try that, thanks a lot for the answers!
