Auto capture logged in user ID in DB

Hello Adalo Fam,

How can I auto-capture the logged-in user email ID into a DB field?

Use case:
I need to add a “created by” field to each form entry and then list out the DB entries based on the logged in user.

Current blocker:
Currently, however, I don’t see an option to auto capture logged-in user ID and associate it with the entered form data. I am adding another field that is connected to the users’ table and the logged-in user has to select their ID from the drop-down.

Is there a way of handling this better? Any help is much appreciated.

Thanks a lot, fam!

Hi @Shivh,

Welcome to the community :partying_face:

You can create a one to many relationship and store logged in user. If you need just the ID you can create a number or a text property and store it. But I think creating a relationship and storing the user would be good because then you can access for every properties in the Users collection instead of the ID only.

To update this automatically you can add it on the automatically section in the form!

Check this out! : Link logged in user to added record.mp4 on Vimeo

Thank you

1 Like

hi @dilon_perera , thanks for the welcome and this solution - the video was helpful!

I have created one to many relationship right now with that dropdown. But, I wanted to just capture the logged_in user’s email ID, which I am able to do as well.

My next question:
How to remove default actions to a form?

When I link a form to a DB, the actions on the form submission is pre-set. I don’t have control over what field values can be set. My steps to create a row of data that I need right now is:

  1. Let the default form action create a record.
  2. Then, update that record with the data I need(as shown below in the screenshot).

Is there a way I can remove the default action and just create my own action?


You cannot delete the default create action on a form. If you want to add your create action that fills some fields and not all fields, fill other fields with other fields values you can use a custom form. : New Place 2.mp4 - Google Drive

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