How to connect 2 Data Types in a Workflow?

Hey,

I have 2 Data Types - Team & Member.

I would like to add Members to a specific Team, but I cannot get the Workflow (ie; when Add Member is clicked add member to XYZ Team) I just keep getting errors?

I have a page created team/zyz-team (this is created dynamically from the team name that is entered on the homepage), and this is where I have the Add Team Members field, but like I mentioned I cannot connect the 2 Data Types (Team & Member) and for a Workflow to work correctly?

Any advice.

Can you share the page and workflow you built? It can be via screenshots or a view app link.

Anyway, I’d try first by having a field Member List in the Team thing and then simply adding the Member to that list, and also having a field called “Belongs to what team” in the Member thing and put the Team there, but I suspect that what you’re wanting to achieve is more complex than that.

Thanks for the advice @vini_brito but those suggestions don’t seem to work :frowning:

Can you share a link to your app editor, or at the very least, images of your data set up and the workflows you’re trying to run?

Based on what I’m looking at, it looks like you’re trying to set things to “Current Page’s Team,” but the Current Page does not have a Team assigned anywhere. That’s likely why nothing is happening. At some point on page load, you’ll need to set the Page data as a team.

Ok. Makes a little more sense. Any pointers on how to set this correctly on page load?

Well, I’m not sure based on how you set it up. You might be able to use a Page is Loaded event to do that, then a “Display Data” action where you get the team from the URL. I would usually recommend sending the data when the user navigates to the page as part of the “go to page” action, but because you’re using the Get Data from URL, not sure the best way to do that.

Oh. So I’m a bit stuck then :frowning:

Did you try the Page is Loaded route I mentioned?

Was not sure how to set that up properly :slight_smile: This would be on the Team page I’m guessing?

Tried setting a Page is Loaded workflow on the Team page, but not sure which exact actions to use?

I’ll answer here now.
So you’ll have to change how you send the user to the Team Page. My suggestion was to use “send data to page” to send the user to the Team Page, instead of the current way you are doing with the URL.

I’ve set an example in the app, take a look at it. It sends the data of the newly created team to the Team page, and every element there now can draw data from the team page.

Check specifically the workflow that creates a team at the index page.

Thanks.

The issue there is that I can’t automatically go to the Team page when the button is pressed. I need to show the team URL that is already there (ie; mysite.com/team/team-acme). Then the user clicks that link to go to the team page. So your current method will not work :frowning:

I’m also getting URLs with loads of digits - team/big-spaceship-1545060567342x782512862710464500 instead of a much cleaner team/big-spaceship

And in the App Data 1545060567342x782512862710464500 has been added as a Team Member to the Team?

That’s the unique id of the thing Member. The Member has a name… you just have to adjust your view of the database.

Yes it goes, that’s what the “Go to page” action does.

Yes. Sorry have adjusted the view in the DB. That’s all cool.

But with the ‘go to page’ like I mentioned I need to display the link first on the homepage. It’s inside the Group Team Link. I need to have this show first, then a user clicks (or copies) this link to go to the homepage. Currently with the Workflow set on the button the user will not get to see this link?

Yes, the user will not see the link, no need for that. The user will click the “create team” and be immediately sent to the team page. It’s easier for the user.

If you need to show the link you can show the link at the team page.

Good point Vini :slight_smile:

How could I create, say on the Team page, a button that says ‘Copy Team URL’ that would copy ie; https://mysite.com/team/team-acme which a user could then share with other team members?

I looked everywhere on how to do this, but could not find a solution :frowning:

Still getting those crazy URLs though on team page creation - team/big-kahuna-1545061964540x134707170320056320

You can use the plugin “Air copy to clipboard” for that.

Uhm, I really haven’t touched that part of Bubble yet, so I’m unaware on how to get better links, you’ll have to search the forum or open another topic for that.