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

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.

Help is much appreciated!

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

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.

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.

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

Yep! that’s right

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

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

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

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