Redirect user if user didn't create a database entry

Really need help, can’t figure it out just yet.

let’s say User is on a page and I want to redirect a user, if the user didn’t create a database entry

How would I do it?

Do you mean a user who doesn’t have an account?

Or a User who doesn’t have an entry for a specific field/datatype?

In any case, you can run a workflow, with a conditional to only run it when the current user doesn’t have the specific data (i.e. that field is empty), to redirect to another page.

You can run the workflow on page load if you want to redirect the user immediately when they try to access the specific page.

Or a User who doesn’t have an entry for a specific field/datatype?

i.e. that field is empty), to redirect to another page.

I can’t create an expression, thats’ the problem

I am doing workflow - when page is loaded and only when - do a search for… and here im in trouble

You’ll want to use only when: current user and then add whatever constraints you need after that.

For example to redirect when the current user isn’t logged in/doesn’t have an account use: only when current user isn't logged in

If you want to redirect the user when a specific field is empty, for example if they don’t have a ‘language’ selected, or if their ‘bio’ is empty etc. then user something like only when current user's language is empty or only when current user's bio is empty

basically I am trying to redirect a user if they didn’t create a thing - RSVP

I can dm you app link if it helps?

Doesn’t seem to work it seems like I am not building the right expression :confused:

OK, in that case there are 2 ways depending on how your datatypes are connected.

  1. if the RSPV datatype is stored on the User datatype (in other words there is a field ‘RSPV’ on the User that relates to the RSPV entry) you can use only when current user's RSPV is empty. That will run the workflow when the current user doesn’t have an RSPV stored on their User entry.

  2. If you don’t’ have the RSPV stored on the User, and instead have the User stored on the RSPV (as in the Created by field) then use only when: search for RSPVs (created by current User): count<1. That will run the workflow when there aren’t any RSPVs created by the current User.

The first option will probably be quicker as there’s less searching required, but I doubt there’ll be much in it to be honest, so either should work just fine,.

1 Like

Sure, if you still can’t get it to work send me a link and I’ll take a look.

1 Like

I have sent the link to you. tried both and didn’t work :confused:

defo doing smthing wrong me

i did it and doesn’t seem to work still

it redirects even if there is a rsvp created

All your user’s RSPVs are empty

So if using current user’s RSPV at the moment it will redirect for everyone, as no users have RSPVs saved in the database.

So either you need to add the data, or use ‘search for RSPVs’ instead.

This topic was automatically closed after 70 days. New replies are no longer allowed.