Trigger workflow action based on something exisits in database


Can someone help?

Our database fields:
Users (Fields: Standard + userEmailDomain)
Companies (Fields: Standard + companyEmailDomain)

When user signs up (presses sign up button) we want to sign the user up, and redirect the user to one of two pages.

We extract the email domain for both User and Companies.
If the Users EmailDomain exists in any Companies then go to page X
Else go to page Y.

We want to automatically add new users to a company, if it already exists. If it doesn`t, then we send them to a page to create a company.

I am really struggling getting the “Only When” function to become blue, it is red no matter what I do.
Have tried to do a search for companies email domains with the constraint of the users Email Domain, and the other way around.

It states that the result of the “Only when” cannot be empty, but needs to be Yes/No. Cannot get that part to work.

I have attached two screenshots, they are slightly different. On the first image the search function is displayed, took the screenshot before I added the User Email Domain as constraint, which is fixed.

Anyone that can help out a bit here? Let me know if more information is needed.

Kind regards

For better security why not allow one person to set the company up and then that user will invite users to their company. Otherwise I can just go make up and email address with the companies email address and have access to the companies data. Seems like a security flaw to me.

You can test it if you want.

Yes of course. Thats where the redirect page comes in. They will fill in more information such as department, title, phone number, ect. After that they will have to confirm their email adress and their manager will have to approve them. Without the confirmation they will not get access to any information.

Once approved, they can invite others into the company. We have customers where this approach would be highly beneficial you see.

Ok, you had me worried for a moment. :slight_smile: As long as you have the appropriate safety measures in place :wink: