Navigating to a Screen from Two Different Collections

I am pulling a lot of data from APIs. On the home page I have a “featured show” that has a showid in it. So this comes from ‘featuredshow’ api/collection. I also have a schedule page (schedule api) and a show list (show api) page.

All these collections have a showID in it that I want to pass to the same ‘show detail’ page. Think of it as a PHP $_GET[‘showid’] so I can display show details. The problem is each previous page gets the showid differently. Once I get to this show page, I don’t need any of the previous data passed over.

I am confused on how to go about this. I read something about a hidden input.

I was able to solve this. On the show detail page, I have a hidden input field with a list that gets filtered based on the hidden input. Then any page linking to the show detail page can set the value of the hidden input. Works well.

Would be nice to have global variables.

Hi @ncmarc,

You’re right about the global variables, it’d be nice to have them.
Another way to store smth globally - you could add the auxiliary property to Users collection (as it is accessible from everywhere, except if user is not logged in). And use it to store some values.

Best regards, Victor.

@Victor How do you make anonymous users like you did in your shopping cart example?

I am having odd things happen using a hidden field and it’s not very elegant. On button click can you set user’s current show (for example) and then 2nd action go to next screen, and pull the value from user?

I have multiple screens that need to be accessed from many different locations in the app and trying to push fields around is getting complicated.

Hi @ncmarc,

Sorry, I don’t quite get your question.

If you’re asking about how do I create “anonymous” users, thats pretty simple. On the “welcome” screen, I have a button “Guest”. By clicking on this button, the new user is created, click action = “Sign up”. In this action I add a random email (e.g. RAND(10000000,99999999)@mydomain.com), random password (same RAND formula), mark this user as “Pseudo” (additional boolean property).

And then I direct user to the next screen.

Does this answer your question?

There is a whole another story of converting pseudo-users to real ones :slight_smile:

Best regards, Victor.

1 Like

@Victor Thanks so much! I did actually figure this out by watching your video a couple times.

I haven’t worked on this yet, but to create them into a “real” user, do you just let them update their email address and password? In my particular scenario, a radio station and podcast app, If they are guest (pseudo), I do not let them create playlists and save favorites.

I am mostly using the user now as a session manager to track settings of what they are clicking on so I can link to screens from many places (thanks for this tip!)

Hi @ncmarc,

Generally speaking - yes, when they’d like to store their data, I ask them to enter email & password, and change the variables in Users collection.

But there are some other auxiliary activities, like storing the “pseudo” name in a separate field, reconnecting shopping cart/order, allowing them to proceed with order if they don’t want to register, etc.

Best regards, Victor.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.