How to capture the name of the user who created an entry

Hello,

In my bubble setup, users log in and create an entry in another table. In that other table is a field to capture the name of the user who created the entry. So far, I’ve set up my work flow to copy all the input fields from the form - no problem. When I try to add the name of the user into the “user” field, I get an error. I tried:

User = Current User’s First Name (error)
User = Current User’s First Name formatted as: (but nothing down this path makes sense)

How should I set up this formula. Thanks!

Which type of field is User?
Also… do you really need this field? if the user is logged in, he will be the creator of the item and everything related to this user in User DB will be available by using the field: Created by (native field from Bubble on all items like created date, modified date, slugs and unique ID)

1 Like

You don’t need to capture the User’s name. Just the User itself. And Bubble does that automatically for you anyway in the Created By field - but if you want to double up on it you can do the same with your own additional User field.

1 Like

Ok, I get this. My next challenge, then, is to include the “Created By” data in an Excel export. I have the export function working to pull in all the fields (and I have a “User” field for this purpose, but I can remove it if I don’t need it). How can I send the Created By detail to Excel in the export?

Ah… ok that’s different… but I’m goign to presume you want to use the User’s Name in the export? (as opposed to the unique ID?)

There are two ways you can do that…

  1. Is to store the user’s Name on the User datatype (completely redundant - but necessary if you want to to this in vanilla Bubble).

or

  1. (my recommendation) use the 1T - CSV Creator Plugin | Bubble plugin
2 Likes

Thank you! I appreciate you taking the time to offer suggestions.

I actually did find a solution - in the export, where the Data is Search for Items:formatted as text … I was able to locate This Item’s Creator’s First Name This Item’s Creator’s Last Name

It worked.

1 Like

But, how do you access the created by field? When I try to display it (or view in debugger), it is empty, but I can see the values of created by when I look at them in the table/db. TIA.

I think I figured it out. I had to change the privacy settings of the user table.