Stuck with notifications

Hi! I am struggling with populating a db field (Recipients) that I need to populate so I can create scheduled notifications.

Three screenshots attached:
(1) The definition of the Scheduled Notifications table. The Recipient column is a link to the User table.

(2) The login screen of the app asks for an email. When the user clicks the Start Contemplating button, a new record is pushed to the Scheduled Notifications table. Recipient should populate with “Logged In User”

(3) An image of the records in Scheduled Notifications table. As you can see - the Recipient column doesn’t get populated

What am I missing?

Hi @ido :wave:

Does that user email is on your Users collection? If not he is not a Logged in user.

Thank you

Thx for your quick response @dilon_perera !

Yes - I believe it is. Here is a screenshot of the users table

1 Like

Your welcome!

Does your app has a Signup screen and a Login screen or did you add this email? Or is your app first screen is the screen in the screenshot ? ( Because I see that screen navigation type is Welcome screen and Home screen)

Thank you

Yeah it’s the one in the screenshot

If you are not logged in then it will not Populated.

Add a Signup screen and a Login screen and add the Signup screen as the Welcome Screen and Signup and try. Then you are a Logged in user. Then it will Populate.

Thank you

Oh got it (I think).

So all I need to do is make sure that this screen is a Login screen and not a Welcome screen?
What defines a logged in user?

Add a Signup screen and a Login screen and then make the screen navigation type for the added Signup screen to the Welcome screen ( Then that screen is the first screen and then user can Sign Up) and then in the Signup form Submit button link to your screen that the notification is creating. And then try.

Logged in user is like he has Signed to your app and you can add actions based on Logged in user.

Hope this solve your question!

Thank you

1 Like

Awesome. Got it.

Last one - is it possible to not have a signup and a login, but only one screen, that has only an email field and a “Login” button, and if that email doesn’t already exist it creates a new user?

Originally I thought I even wouldn’t have an email field (no login at all), but figured later that I need to have it to send scheduled notifications. But generally wanting to simplify everything as much as possible for the user.

It’s good if you add a Signup screen and a Login screen.

When you came to the Signup screen you can add the email , password and name and Signup and then you can send the notification.

Hope this solve your problem.

Thank you

To Signup you need a Email field and a Password field
And Login is needed if the user log out from your app.
So you can add a Signup screen and then when the user enter the email and password then the user going to the screen. ( I mean the notification screen in your screenshot)

Hope it helps!

Thank you

A one idea came to my mind.
But can’t test because now I’m not with my computer.

Add a Signup action to that button. ( More > User Login > Signup ) And for the Email and Password fields you can add the Input. And add a link action to another blank screen. And add a screen action to that screen. ( The notification create action.) And add a link action to the other screen. .

I hope it will work.

Thank you

1 Like

Thx @dilon_perera, I’ll play around with it!

1 Like

Great :+1: and your welcome

Sorry I didn’t say this. Make the Signup action conditional. Otherwise every time that action will happen.

But I think if you add a Signup screen to put the email and password and then link to the Notification create screen it’s good. And you can make the Signup screen as the welcome screen and the Notification create screen as the home screen.

Or you can add another screen and add a Input component and a button and add the Signup action and for the email and password fields you can put the input and link to the Notification create screen and make the screen navigation type of the newly added screen to the welcome screen and the notification create screen to the Home screen. Same like of you have add a Signup screen.

Hope this will solve your problem :+1:

If it’s solves your problem you can mark it as the solution.

Thank you

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