https://discord.gg/botpress logo
#🤝help
update a record
# 🤝help
f

faint-pizza-68420

02/15/2024, 8:48 AM
Hey guys, I have “Users table “ set and work perfectly! But, Here is my case: The flow of my chat bot goes like: Bot: what’s you name ? User: yasmeen ( name stored in user’s table ) Bot: how old are you? User: 25 ( Age stored in user’s table ) ………… *Then bot will ask the user : Bot: All info is correct? Or you need to correct something? User : I want to update my age Bot : so what is your age? User : 22 Bot: ok, I’ll update that! …………. So how can I update the “age” in the user’s table?
b

billowy-morning-42410

02/15/2024, 9:09 AM
Hello @faint-pizza-68420 , you should not save it in the table yet. Keep it in variables, if you decide to change something, just change the variable, then if the user agrees then you can save it in the table.
That's why you ask if everything is correct in the data provided, to be sure and send it to the table
f

faint-pizza-68420

02/15/2024, 9:13 AM
Ok 👍🏻 I’ll try it then , thanks a lot!
b

billowy-morning-42410

02/15/2024, 9:17 AM
😉 Let me know if there is anything, you can still do it if you have already inserted it. However, the correct way would be to keep it in variables and then when the user agrees to take it to the table.
f

faint-pizza-68420

02/19/2024, 10:06 AM
Updates: @billowy-morning-42410 I’ve tried your suggestion , and it’s works as I want exactly! Thanks