Forum Documentation Showcase Pricing Learn more

How to Switch Between User / Business Profiles

What is the best way to structure a database to allow a user to add a business page? Ideally, I’m after the functionality of Facebook, where the user is able to add a business page, each with a post feed, and the ability to switch between personal / business profiles.

As it stands I have data types for “user” & “business”. I have created a data type “post” and the ability for both a user and business to create a new post on separate profile pages. The issue is that when a business post shows up in a public feed, I have to link to a single profile page. I can’t link the name back to the “creator”, because “creator” as “data to send” returns the logged in user, which is the user’s personal profile.

Any suggestions?

What is the best way to create “use as personal” / “use as business” functionality?

Do I need to restructure the database so each user has two types? Unfortunately this would probably require a separate login (two emails) for each business, and the user/business profiles wouldn’t be connected.

Thanks in advance.

You only have one user type, so that best way here is to have a field on the user type that is the category of users. Then, with conditions on elements and workflows, you can refine what your app does based on the user type.

Thank you. Keep up the great work!

1 Like