2-sided Marketplace Role-based routing after signup not working — both users navigate to same page

I have a two-sided marketplace signup page. After signup I need to route one role #1 of users to home #1 and another role #2 users to home #2. The role is saved correctly to the User data type. I have tried navigation with Only when conditions on both Current User’s role and Result of Step 1’s role but both users navigate to home #1 regardless. How do I correctly implement role-based routing after signup?

Hey @jason24lv

Welcome to the Bubble community! :tada:

what does your workflow look like? Let us know. :blush: Can you post a screenshot please.

Thanks @J805. Just started last week and already stuck lol

No worries. When you sign up as a user, the best thing would be to press the step by step debugger. That way you will see the workflow as it runs and then you will see what doesn’t work. This screenshot isn’t really enough for us to see the whole picture. It’s cropped. :blush:

Hi @jason24lv ,

I will try to help on this.

Can you attach the screenshot for the Step 3 “Make changes to current user”?

I’d guess that the redirect is happening before the change to the User in step 3 is complete.

You don’t need Step 3 (Make changes to User).

Remove that step and set the User role int he signup action.

@jason24lv

Try putting the sign up into a custom workflow event, they are useful to ensure the actions within complete before other actions in series run. Although the conditional use of a previous steps action are supposed to do the same sort of thing, it is not as consistent.

  1. Create custom workflow with parameters for values needed to create account, and return value, which is the role you need to know to route correctly. The signup action to create the account is able to add all fields on user data type, so no need for extra steps to make changes after sign up.
  2. In main workflow from signup button click, first action is to trigger custom event; that will run the custom event.
  3. Make sure the custom event you created after signup action has action to return data, which is going to be the role.
  4. In main workflow you can then do the navigation based on custom events returned value.

The idea is the custom event will not return the role until signup is complete, so navigation will not happen until after the role is returned by custom events.

Hi @jason24lv ,

Simply change the condition on Step 4 and step 5 from “Result of 1” into “Result of 3” to check the role.

@adamhholmes — Thanks. I removed the ‘Make changes to current user’ step and set the role field directly in 'Sign the user up’s fields. This got one role navigating correctly, but the second role doesn’t navigate at all (stays on signup page) despite the mirrored condition.

@mani2726 — Thanks. Unfortunately, ‘Result of step 3’ isn’t available in my dropdown, only ‘Result of step 1’.

boston85719 — Thanks, I haven’t tried custom events yet - not sure how to go about it or wasn’t sure if I’d find the option in current UI. Could you point me to where ‘Return data from event’ lives in the workflow panel?

Also fwiw, I tried converting the role field to an Option Set instead of text — dropdown stopped showing any choices afterward, so reverted.

Current state: Using ‘Result of step 1’s role’ with text field, one role works, other doesn’t. Both users go to the same homepage when I am trying to route each to their own respective homepages. Any ideas on why one condition fires and the mirrored one doesn’t, even though both roles save correctly to the database?

Hi @jason24lv ,
Remove the condition on Step 1. Update the Role field using “formatted as Text” and as per your Role text.