Update record in database

Hello everyone, I’m trying to implement a reminder feature for tasks and would like to know how I can insert a value into the database. I’ve already created the fields but I can’t manage to insert the data into the database...
No description
6 Replies
charles
charles3mo ago
Hi @Marcos Beraldo, glad you are playing with Twenty 🙂 to be more aligned with how Twenty works here is what I would do: - create a reminderDelay SELECT field ("NONE" | "SAME_DAY" | "ONE_DAY_BEFORE" | "TWO_DAYS_BEFORE") (standard field, you can edit task.workspace-entity.ts) - create a reminderAt DATE field (standard field, you can edit task.workspace-entity.ts) - display reminderOption on the view itself (you'll be able to edit its value using the existing UI - add a listener on task.updated in the code (you'll find some example in the code base) that updates reminderAt based on reminderDelay and dueAt - create a cronJob to check reminderAt and send some emails or whatever you want to do
Marcos Beraldo
Marcos BeraldoOP3mo ago
I confess that I'm struggling a bit to learn how to use Twenty 😅 . Anyway, thank you for responding, I'll try to implement these steps very soon.
charles
charles3mo ago
It's not easy at the moment and we are not documenting a lot. As things keep getting more mature, we will provide how to guides 🙂 I'll close this one for now, feel free to re-open it if you need more help
Marcos Beraldo
Marcos BeraldoOP3mo ago
Hello again @charles! Your step-by-step guide gave me a better understanding of how the project works, but I still haven't been able to achieve the result I'd like... I need to know how to add this listener to my select component so that it updates the database and shows the value. Currently, when I close the calendar and reopen it, it loses the value I selected for the reminder
charles
charles2mo ago
@Marcos Beraldo would you have a branch to share with me, I could guide you more precisely from there
Marcos Beraldo
Marcos BeraldoOP2mo ago
I sent you a DM
Want results from more Discord servers?
Add your server