Calling experts! Sending data based on different user roles

I have no idea how to phrase this; and everything I’ve searched hasn’t been what I am trying to describe…

Basically, I have a project with three “tiers” and are an option set within the user.

  • Companies (2-20 employees)
  • Freelancers (1 owner; multiple clients)
  • Just a single user with no affiliation to a company; and not a

I am struggling with the workflow at login. Sorta complicated so I will give example. The user logs in, and is an employee of “Company A” but also uses my software for their freelancing business “Side Job A”. I need a workflow that prompts the user at login which “profile” they want to sign into.

Right now, I have a login page with conditions on page navigation. If the user is apart of more than one profile, to prompt the “select-profile” page. I am stuck on the data part though.

User selects button for “Company A” and goes to the dashboard. I need the dashboard to only show data relative to that company. Basically, all data between all pages in the session need to be from Company A. If the user wants to view data from “Side Job A” they need to log out, log back in, and switch accounts to the other option. When pressed, they still see the same pages but now all the data is restricted to just Side Job A.

I am trying to avoid going back to one email per account, but this is an issue I am trying to solve on a database I’ve spent a few months on so I am really trying to avoid the headache of fixing everything in the project… thank you for the help!

Let’s say you have three DB
A) User (have one field that point to company, let’s call it “active company”. Also add another field that point to company that is a list of company the user is linked to)
B) Company
C) Job

When user create an account, you should ask if he register for a company or not. If not, you will create a company and just give it the user name as company name.

When user log in, if Current user:company linked to:count >1 Go to company selector page, if not, go directly to dashboard but before, assign the current user active company to the Current user company linked to:first item. On the select page, when the user select the company, make change to current user active company with the selected item > go to dashboard

Now, when item are created, you should always set a “company” field. In privacy rules, set Current’s user active company is This data’s company

I sorta see what you mean. But I’m stuck on the data portion. Do you think if I add a parameter to all pages referencing the active company that would work? I.e. on the dashboard, I have a table. In data source: “Do a Search For Projects” with a parameter “project company” = “current user’s active company”

As I type that I feel like that could work. but based on the design of my app and databases I sense an entire day editing all my workflows and data source equations.

If you have already done this (or anyone else reading with this) would love to see your editor link to help me visualize.

You don’t need that if you set privacy rules. Privacy rules like I suggested will already filter out all job that are not Current user active company is This job company

I see. I think that is a perfect solution - I need to run but will circle back if it works. Thanks in advance!!

1 Like