How to automatically make a schedule
Options
George
Member ✭
Hi there!
I'm making a schedule of lessons. The first lesson must be started now. Each next lesson starts on a date +2 days from the previous lesson's starting date. These dates must be written to the database like a timestamp.
How to make a schedule where the first lesson will start now and each next +2 days then previous? Thanks for any ideas!
I'm using functions:
1. Query all lessons
2. Run 'For each loop' function for each lesson in the array
3. Create variable with timestamp 'Now' +2 days (inside each loop function).
4. Add a scheduled record to the table with point 3 payload (inside each loop function)
5. Get issue with the first scheduled lesson because it has the date 'now +2'
[Снимок экрана 2022-08-23 в 16.35.25.png][Снимок экрана 2022-08-23 в 16.34.35.png]
I'm making a schedule of lessons. The first lesson must be started now. Each next lesson starts on a date +2 days from the previous lesson's starting date. These dates must be written to the database like a timestamp.
How to make a schedule where the first lesson will start now and each next +2 days then previous? Thanks for any ideas!
I'm using functions:
1. Query all lessons
2. Run 'For each loop' function for each lesson in the array
3. Create variable with timestamp 'Now' +2 days (inside each loop function).
4. Add a scheduled record to the table with point 3 payload (inside each loop function)
5. Get issue with the first scheduled lesson because it has the date 'now +2'
[Снимок экрана 2022-08-23 в 16.35.25.png][Снимок экрана 2022-08-23 в 16.34.35.png]
Comments
-
Try the transform_timestamp filter
[IMG_9696.jpeg]
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