top of page

Forum Comments

Header not collapsing fully
In Coding with Velo
Display repeater data based on logged in member price plan
In Coding with Velo
ionicgrid
Aug 15, 2020
@Code Queen Nayeli well unfortunately the mission ain't over yet ;) I'm getting the 'Purchases' database to populate with MemberID and PlanID. I have another data collection called 'Program Plans' that houses all the relevant information for each program such as program number, title, description, purpose, background image for the repeater etc. I also have a reference field called MemberID from the 'Purchases' database to link the two data collections. I have connected my repeater to the 'Program Plans' dataset to automatically populate it with all the relevant information. When I try to filter based on owner = logged in user, on my live published site, I get a blank. And I guess that makes sense, because in this case, the content hasn't been created by the logged in user. Instead, when I try to add another filter....this time using MemberID (from Purchases data collection) as a reference field in the 'Program Plans' data collection, I am unable to add it as I get the message "none of your current datasets are valid for this filter" From further digging on the forum, I realize I need to add some additional code for this to work. I have added this so far... let user = wixUsers.currentUser; let userId = user.id; wixData.query("ProgramPlans") .eq("_id", "user.Id") .find() .then( (results) => { if(results.items.length > 0) { let items = results.items; Am I heading in the right direction? I'm still unclear on how to actually filter the repeater content based on logged in user. Would appreciate some guidance. Thank you so so much.
Display repeater data based on logged in member price plan
In Coding with Velo
Display repeater data based on logged in member price plan
In Coding with Velo
Display repeater data based on logged in member price plan
In Coding with Velo
Mobile Pricing Plans Repeater Code
In Coding with Velo
Task completed button.
In Coding with Velo
ionicgrid
Aug 05, 2020
Hello, This is exactly what I was looking for. Thank you so much. I'm way over my head with writing code for this and would really appreciate any help. To be honest, as you can probably tell by seeing my coding attempt below, I don't really what I'm doing hehe. I've read several posts in the past couple of hours on this but still don't have a clear direction. My objective: 1) Upon completion of a task, a user check marks the associated task checkbox 2) This information gets updated to the database in the form of -- "logged in user" has completed tasks 1,2,3,4,5,6,7 ... out of 100 3) This information then gets displayed in the form of a progress bar for the user to see What I've done so far... I've created a collection called 'TaskCompletionStatus' and have added the following fields: Member Email: Task Status: for taking in the user input from checkbox Task Number: this is for the progress bar. Each checkbox will have a number associated with it. So if user has completed 15 out of 40 tasks, the progress bar will show this. For getting the user information and inserting into the database, I have the following code which I know I'm messing up and would appreciate any help with this. import wixUsers from 'wix-users'; import wixData from 'wix-data'; $w.onReady(function () { let user = wixUsers.currentUser; user.getEmail() .then((email) => { let userEmail = email; }); }); export function day01task01_change(event) { // when user clicks checkbox let toInsert = { "memberEmail": "email", "taskCompletionStatus": "taskstatus", "taskCompletionNumber": "tasknumber", }; wixData.insert("TaskCompletionStatus", toInsert) .then((results) => { let item = results; }) .catch((err) => { let errorMsg = err; }); } Right now I can't even get the database to populate, so I haven't even began implementing the other steps for actually displaying updated information to the user. Appreciate any help. Thank you.
1
0
Header not collapsing fully
In Coding with Velo

ionicgrid

More actions
bottom of page