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.