Please check my detailed comment below.
Hello, I am using “Members App” from wix on my clients/users. I also have a database named “mymembers” that saves data the same from the members app data, when a user register.
Now when i try to display a the value from my “mymembers” dataset, it will not display base on the login user rather based on the latest data of the data base.
How can i call a certain data on my “mymembers” data collection based on the user logged in to my website?
import wixUsers from ‘wix-users’;
When page loads it will run a code that selects a data from collection based on the user who currently logged in.
Thank you so much!
In your mymembers data collection, you should have a reference field to PrivateMembers collection. You can then do a look up on this reference field based on logged in user’s id.
hello sir. I am not using reference filed. What i did is that I put an insert code when a button click. Aside from it will save the data to the PrivateMembers collection of members app i also did added a code to insert to my “mymembers” collection.
Now, mymembers collection would be my NEW members database. This will all the update and display will take effect. My problem is the “syntax” for calling the data value of the user who currently logged in to my website, if they will visit to their profile page (I added a profile page), where they can update their data.
I’ve been to API reference page, but there’s a lot to be digest there,. and i dont know where to start.
If only I know how to CALL a function variable that identifies the user who logged in… Maybe something link current.user, or current.loggedIn, but im not sure about the correct “snytax”
Note that this tutorial above will only show on the site members first visit to this page, only the user info that you have captured on your signup page like email.
If you want more shown, then add a custom or corvid signup option and add those extra user inputs to it like first and last name and school etc.
You will also need to add school as a custom field in your Contacts in your Wix Dashboard.
@givemeawhisky Thank you so much for your reply sir,. Im going to check on the link you gave.
@givemeawhisky Hello I am still using the “Members App” from wix because of the builtin features, when the user signs up it saves to both “members/PrivateMembersData” and “mymembers”, for the reason i want to add a school data when a user register. I successfully managed to do that.
So what i did in the user profile is I hide the default pages and i added a new pages (my profile & my downloads), now I want to display the FirstName, LastName and School based on my “mymembers” data NOT from the “members/PrivateMembersData”. Because on “mymembers” data is where my school data was stored. I hope i will be enlighten with this.
So when a user updates his/her data the updated value will be saved/recorded on “mymembers” data, not to the PrivateMembersData. That would be fine because I only wanted to show data is from “mymembers” data.
I am hoping to know how to display/call a data from a selected collection base on current login user.
I am guessing getCurretItems or getCurrentUser has something to do with this but i just don’t know how 
Thank you so much sir.
I got it.
Thanks to this Thread: https://www.wix.com/corvid/forum/community-discussion/solved-get-any-data-from-wixusers
Yehey!!! This code will display the data on the input textboxes of the current user who logged in the website. Using your custom made collection. I have been reading and exploring a lot,. xD
