set_ifnotnull not letting us set empty value
Options
stephane
Member ✭
We understand that set_ifnotempty skips all values empty/null.
What about we want to reset a value for a record e.g
PATCH /users/:id
{
name: "",
}
Should let us set name to "" but it is not (set_ifnotnull skips it)
Tagged:
Answers
-
Hi, Stephane. In this case, using the set_conditional filter is going to be the move here, I think. This will allow you to update a value to empty if the input has an empty value, instead of just not updating it at all.
-
Thank you Chris!
I found out this solution which is best for PATCH to reset values if we pass them
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