Login to last accessed project

Good day.

Presently I am offering a platform, where a user and it’s invited collaborators, could manage multiple projects.

I have logic in place today, which passes through the current project via onboarding and maintains (mostly…sometimes the value is weirdly lost) the active project in a drop down in the header.

I next created a last accessed date field in the DB, with the hopes of returning a user at login to whichever project they were last in (and maybe a solve for when the system hiccups and I lose the current page project value in my drop down, returning it to null).

I am stuck on the logic to integrate this last accessed date and not toss out the new sales or new project setup default.

Any pointers?

Hi there, @K.T… this suggestion might not be the best way to go, but if I understand your post correctly, I did something similar to what you described in one of my projects, and the way I did it was to have a field directly on the User data type to store the active project. With that field in place, it’s easy to set it and refer to it in order to return the user to their last active project, and it’s just as easy to not throw out any sort of new project setup default because the field will be empty.

Anyway, that’s just one way to go, and I hope this helps.

Best…
Mike

Thanks @mikeloc I’ll give it a try. Makes total sense.

Appreciate it.

1 Like