Hiding data in PATCH call
When making a Patch call that edits data within an object, in order to ensure the data does not end up "null" or "false" i have to input the existing variable's data within each data set.
Is there a way to not have to input the existing variable's data?
Even when i hide the data from the API it still sets it as "null" or "false" when making the call.
Answers
-
Hi @JayyyTeee Xano performs full object replacements, if you want to conditionally edit fields based on the presence of a value for an input, you can use the conditional set filters:
note: that false is not considered an empty value so you would need an actual conditional for booleans.
-
re"Hiding": you would also need to hide the fields in the edit record function - that's what's most important and what is actually doing the editing. So you could have an API designed to only edit certain fields by utilizing this
-
Is there any functional difference between the way Xano handles a PATCH and a POST?
-
@gbdoin The endpoint functionality is handled within the function stack. So for example, the Edit Record function does not change functionality depending on the HTTP verb - Xano still performs complete object replacements.
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