Data to send from logon to destination page

Hi guys,

I can see there has been numerous posts on the topic of Data to send, but each with their own variations, I suppose I am still missing a fundamental concept here.

When a user of type “worker” sign up for the first time, the user completes a profile form (first name, etc.), login and navigate to page worker_home, content type “worker”

When the user comes back and logon (already account), I send the user back to his profile page using his email address as primary key, so it should search for user where “Email Address W” = Input Email address logon’s value, so that it pulls the correct user’s details.

.

I have been going through some of the material and videos but have been struggling with just this one part for a few days now.

Any ideas, what am I missing? Apologies I know this is probably a low level newby question but any direction will be much appreciated.

Hi siebritz78,

so there are two sides to this workflow

a) the sending
This uses “Go to page” and sends data such as “Current User” or a key such as “email address” or “uid”

The key could be uid = current user’s unique id for instance or email = current user’s email.

b) the receiving. On a NEW page that does the receiving you would have the entire page or a group receiving the data. Here is where you use “Get from page URL” and would input the key e.g. uid

This part depends on your setup, and what you are sending. As bubble is based on unique id’s of data if I tell bubble to expect type of content user, then it immediately searches for users with the unique id in the URL. The same would be if I had type “restaurant”, it would understand that the unique id I am sending is one particular restaurant.

A more complex example:



2019-10-29%2014_08_02-Todolisttool%20_%20Bubble%20Editor

The only time you would send something and use get data from URL while sending already, instead of while receiving, as in your screenshot, is if your URL is
www.test.com/john and you want the john to be taken along to the next site too, along with a unique identifier number, as you need both e.g. test.com/john/&uid=123412345

hope this helps
pm me if you need further help, happy to jump on a quick call.

happy bubbling,
Julius

For free tips & step by step lists on Bubble & more check https://tiplister.com/

1 Like

Hi Julius,

This indeed helped me to understand this better. Thank you for taking the time to reply, appreciate the assistance. I attempted a few things hence my delayed response.

Initially I thought I made a breakthrough but appears when I log in with different test accounts, it keeps grabbing the last entry in my “worker” database :frowning:

This is what my search looks like:

I have grouped elements together on destination page and set Data source as below:

It looks like it keeps logging in on the same row in my database as a result of constraint :first item.

I can feel I am closing to resolving this, any further input will be much appreciated.

The logic is, when user logs in, search for user in database where email address is the same as user logon email, direct user to page where his profile details are displayed.

Thanks for the help, I am also going through other resources again to get a more fuller understanding of data binding and searching.

Adrian

Changed Search for Workers from :first item to :last item and now continuously logs in to the last row in the database, so definitely has to do with that constraint. If I remove it, it says it is returning a list and expected 1 row.

image

Just want to quickly say thank you to Julius for taking the time to speak to me and explain how joining of 2 tables works - really appreciated the help :slight_smile: issue resolved.

1 Like

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