How to complete a database + call post API

Hello,

I’m looking for your help,

I imagine it’s not very complicated, but I can’t find the solution…

My problem is in two parts.

The first one, imagine you already have entries in a database, and you want to add the missing ones. To be more precise, some data is stored in the database via the popup 1 - and it is necessary to go to popup 2 to complete it.

The complexity is that this new additional information has to be registered on the account of the user concerned, i.e. in this case “Bob” of the user “matthieu-test5@gmail.com”.

The second one is to call the API (POST) with all the informations of “Bob” of matthieu-test5@gmail.com

I know how to call the API (POST) but i don’t find how to call the API specifically by the data linked to Bob.

Can you help me?

Matthieu

Hey @matthieu3 :wave:

Do you mean how to pass dynamic values to the body of the post API call? I guess, this is what I understood from your question, assuming you want to make a post call with the data of Bob, and maybe with data of other users later on using the same post API call.

If this is the case, you can set dynamic values like below (within these brackets: <>):

In this example, quantity and foodid is a variable that can be passed dynamically (you should also uncheck private):
image

I hope this helps.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

Hello,

Thanks for your help, but well, not quite;

I realize I didn’t go into enough detail.

Imagine this. I’m creating a person, for whom I’m assigning human traits, such as first name, voice, native language and so on.

Once I’ve done that, I can complete the information in another window. I have to select the person (via a drop-down menu) to complete in order to add things like where they live, their preferences, and so on.

So, for the second window, I’m looking at what workflow and/or conditions need to be entered into bubble to record this new information to be assigned to this person.

Bear in mind that another user may also name a person Bob, so user 1 must not modify user 2’s “bob”.

And once done, if the current user is “user 1”, make a call API (POST), with “Bob” from user 1. I guess it must be a function like “current user” + “Do a search for”?

My problem is :

1/ how to complete a database with already some informations, by using a search via the name and the current user

2/ how to do a call api post, by using the name and the current user (I’m looking for just the function of search)

Matthieu

In your dropdown, you will still search for but with a constraint to shhow the entries with user = Current User so it will only show the Bob which current user is associated to.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

1 Like

Thanks again,

This is not exactly what i’m looking for ;

To summarize:

In the first step, my user creates a profile and gives it attributes. This is recorded in the database. This is what we see in this screenshot:

In the second step, my user can complete the profile, adding new attributes ( which were not available in step 1).

And that’s where I get stuck.

So I use a dropdown menu to select the relevant profile to complete (here, Bob) and save the new attributes.

I imagine it would be necessary to search by profile (i.e. via the dropdown menu), then enter the new attributes. When saving, I imagine that the database will automatically update itself, taking into account the current user and the relevant profile.

I think work needs to be done on the workflow of the “save” button, but I can’t find the right formula to do it. Basically, it’s just a matter of updating a database, by filling in the missing attributes (which are present but empty).

Matthieu

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