Help! I've hit a brick wall with a bulk update function
Hi. I am completely new to xano and I'm struggling to understand it. I was using adalo for an MVP build but hit a wall because the database functionality in adalo didn't support bulk updates. So I'm hoping I can achieve what I want to do in Xano. My app is essentially a to-do list that will break down a big goal (or pledge) into a list of tasks. Initially I'm just using it to encourage people to visit the gym more for a limited time. For example, a user may pledge to visit the gym 2 times a week for 3 weeks in a row. In the front end I am asking each user for: when they want to start going to the gym (pledge_start_date)the number of weeks they want to visit the gym in a row for (weeks_for_pledge) how many times a week they want to visit the gym (tasks_per-week) From those three pieces of data I'm hoping to generate a list of tasks in my database that have a start date and an expiry date of the beginning and end of the week in the schedule they are assigned to. Using the same example of visiting the gym 2 times a week for 3 weeks the resulting list of tasks would look something like this task #1, start date: (pledge_start_date), expiry date: (pledge_start_date)+6daystask #2, start date: (pledge_start_date), expiry date: (pledge_start_date)+6daystask #3, start date: (pledge_start_date)+7days, expiry date: (pledge_start_date)+13daystask #4, start date: (pledge_start_date)+7days , expiry date: (pledge_start_date)+13daystask #5, start date: (pledge_start_date)+14days , expiry date: (pledge_start_date)+20daystask #6, start date: (pledge_start_date)+14days , expiry date: (pledge_start_date)+20days From the beginners' tutorials I've watched I think I need to do something with for loops to bulk update the 'task' table in my database. That task table has the following columns: task id, created-at timestamp, task name, task start date, task expiry date, user id (linked to the user table), task number, week number, task achieved (booleon). Any help on how I can create such a schedule in xano would be massively appreciated. Thanks in advance
Answers
-
Hey @trin0580,
The answer might be coming a little late, but in case you are still on it.
You would just need to hit an endpoint with that data from the frontend, and inside that you would have a for loop that would Add Records in the Task table.
If you still need assistance, hit me up and I can provide more details.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback