So the question was, and hopefully its not too much of a bother. How would we assign one of our repeating group values a logout function. Then after we log out, is it possible to be re directed to a certain key value?
So after logout, user would be redirected to home group?
If we were using multiple pages I guess the steps would be much easier, but seeing as we are using a single page this is where it got tricky for me.
Look forward to any insight you may provide on this
In that example I’m triggering one set of actions if the button’s type is Logout, and one set of actions if the button’s type is empty. The button is the same, so you can use it for buttons or groups within a repeating group. You would do the same based on your dataset with one more level of depth, something like - if this button’s menu_item’s tag is: logout.
If I could bother you with something else?
Seeing as its a single page app, how do we differentiate between user types? Bussiness/customers etc, where on sign up/ login as customer shows different groups to businesses.
I made a drop down with the user types in sign up, and created a state (possibly incorrectly) but regardless of which one I choose to sign up as it shows customers views…
I created 2 data types (business/customer) with relevant fields, and im referencing those on sign up and they’re populating in the db correctly. The only thing that’s wrong is the signing in where it defaults to a customer view…
Sorry that was a bit long haha, but if you can help with this I would much appreciate it if not I completely understand too
Yes well, this would be either in your “master” group conditionals, you could have something like
In your example you’d have three “master” groups:
when > this user is logged out > this group is visible
when > this user is logged in AND this user’s tag is “business” > this group is visible
when > this user is logged in AND this user’s tag is “customer” > this group is visible
etc. This is the point you want to plan all user types and make sure they all work. Maybe you’ll have business > big and business > small and customer > north america and customer > east asia, I don’t know. But if you start having big conditionals, or conflicting conditionals, you’ll slow your app down. Plan plan plan You can bring in multiple variables through your url: