Logging a user in and passing through a URL/slug so data can be shown base on that URL/slug

Hi all, I’ve been building an app based off @gregoryjohn 's video - and I’m using the URL to show data if a user belongs to a certain team (hopefully that makes sense!)

I’ve managed to register a user and I’m showing data to specific users based off the URL however I’m struggling to log a user in to a specific team because I can’t add a slug as an action in the workflow. i.e - “navigation → go to page → destination/{slug}”. I basically want to log the user in, and depending on their team, I want to print that team after the url i.e - bubbleproject/dashboard/{team}

I hope that’s not too confusing - I’m just hoping someone can point me in the right direction as my google search results are getting weirder and weirder :face_with_thermometer:

My DB is structured like so -
USER

TEAM

Thanks!

Am I right in thinking I need to set up a parameter key/value first?

Why is User’s Team a list of Teams?

If you set the page data to ‘Team’ then you set the team name in the path using the slug field. Otherwise you can use a parameter as the team name.

1 Like

Because people can work across multiple teams in real life.

If you just want to print the team you can also use the function under go to page “Data to Send”
To set up the slug. Set the slug and define go to this slug “only when”

Thanks for the reply @gregoryjohn - I’ve already set the page data to “Team” but I don’t get how I’m supposed to log the user in (step 1), find out which team they belong to and then set that in the URL and then go to the page (step 2).

When I register a user it’s relatively straight forward as I’m able to set the slug in the email and then register the user to a team based on that slug. How do I set the team name in the URL, after log in, and then go to the next page based off that slug? Sorry if that’s confusing!

Set a Data source “Team” to the page “team hub”
Data to send: Current User’s Team

or check “send more parameters” and set “Current User’s Team’s Slug” to added parameter

Created “Team” should have a slug already to make it work

@Eugene_West - that seems to be the problem! I’m not actually capturing the team when the user is invited and registered :upside_down_face:. Let me fix that and then try again

Yep, that did the job. Thanks again @Eugene_West :+1:

1 Like

In the future, you can ask these questions at Buildcamp on the course page :ok_hand:

1 Like

@gregoryjohn - great thanks for that. Will ask on the Buildcamp course page next time!

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