How to get member's username and use it in the database?

Hi Mike would you like to share more details of your setting, I need this exactly as you mentioned

I’m not sure what more you need to know. The setup is explained in the comment. Add a dataset to the page and link it to the members private data collection. Because the logged on user does not have access to any of the other members data, the dataset is automatically filtered to 1 record, which is all of that user’s data. You can get the field names by looking at the members private data collection in the database area.

Note: When you test this you will be logged in as an admin (probably) with read access to all of the member data, so the dataset will be all members. But, when a user is on the page and logged in the dataset will be exactly 1 record long and populated with all of the fields for that user from the members private data collection.

Thank you Mike, what I need to know is, what is the code of the page or the settings of the button what you used to submit the content of the both datasets. In your case the recipe is connected to a dataset and as you say the member name is connected to a member dataset (another), so when you submit the info how is the code to collect both dataset information, recipe and member.

I grab the member’s ID and store it with each recipe as a field in my recipe collection. I also store any other information about that member I might want to associate with the recipe. Depending on my implementation and which website I am working on, I store more or less user information in my unique item collection. I never store confidential use information in another collection. But the easiest thing to do is simply copy some basic information, like nickname, slug, profileurl, etc. and store it with your data (to save you from needing to look it up later). Then, you only need to perform a standard save or update on your custom dataset. But, your implementation may vary depending on your own rules around use and storage of user data.