Help needed...workflow question - SOLVED

Hi :slight_smile:

I am new to bubble and could use some help as I feel I have fallen at the first hurdle. :frowning:

I have a sign up page for my app.

When a user clicks the sign up button I have the following work flow:

  1. Create a company (with an “only if” constraint doing a count of the company name and whether it exists in the db already). I set the count to be “= 0” and this works fine so that duplicate companies of the same name cant be added via the sign up form.

  2. I want to then sign the user up and create a user record, again only if company does not already exist. I cant use the same count of “=0” as the company will exist (created in step 1), so assume I would at this point have to change the constraint on the sign up action to do a check of company names and if “=1” then create the user.

The problem I then have is that assuming the same company filled out the sign up form again, although the company would not get created, if they entered the same, First Name, Last Name, Email, Password - a second user would get created associated to the same company, or even if they put different First Name, Last Name, Email, Password - the flow would still create a user.

What I want is to stop additional users being added via the sign up flow where company already exists but I cant seem to express the properly in my workflow.

1 Company Create Step:

2 Create User Step:

Is there a way in which I can add a further condition anywhere in the flow that would stop another user being added? Or am I looking at this the wrong way?

Any help appreciated.

1 Like

Hey, welcome to the community :slight_smile:

I think it would be better for you if I fix something and explain on the workflow. I can help you if you share the app with me.

I cant share the app I dont think as I do not have a subscription at the moment I am just using the free version while I get my ideas together.

You can go to settings → general and change the firdt dropdown to private to everyone can edit. Now you can share the editor url with me

OK and which URL do you need? Is it ok to share on here or do I need to message privately?

It’s the bubble editor url. Just copy from the address bar. It will be better if you share via dm

I am not sure how to send a DM!! I cant find anything on how to do this so if I have just posted my app for everyone to see let me know and I will delete

I can explain the issues and the solutions on google meet if you are available now

OK yes I can do this

https://meet.google.com/cmp-aacg-ent

Thanks @tunacardak for your help that really was most appreciated :slight_smile:

Very helpful!!

1 Like

if it’s not too much bother, would you mind sharing a summary of the solution here as well? That way other users benefit as well :smiley:

1 Like

So thanks to @tunacardak the flow now works as expected.

First of all I had not set the conditions correctly and they needed to be moved up a level to the button element level.

So when the sign up button is clicked it performs the search for the company name based on the input field of Company Name’s input field on the sign up form.

Then if the company name “=0” it would proceed to create the company details in the DB.

Again this will then only move on to step 2 (create a user) IF the company does not exist in the DB. The conditions for “Only when” were removed at the create company level and create user level (see my original screenshots).

I have re tested the flow this morning with these changes applied and the process now works as expected. :grinning:

Very happy as I had been scratching my head with this issue for some hours!!

Thanks for a helpful solution :slight_smile:

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