How to update a record... :_(

Okay… I’ve been trying really hard to not ask this question as it seems like really low hanging fruit and should be easy to solve. Alas, I just can’t figure out how to configure my data to properly update a record.

I have seen the video tutorial and looked at the documentation, I have even watched some more in-depth videos on YouTube that touch on this but I can’t seem to apply it to what I see on my screen.

I want to be able to update a specific text field of a given record with the tap of a button. When I go to configure the ‘Update record’ in the data configurator the default schema is this:

I have tried to bind the ‘fields’ property to a custom object, then bind each field to specific data, but this also seems wrong since I only really want to update one field and by default it makes me specific all of them.

It has been suggested in other videos that I would want to create a custom schema, which I have tried to do but can’t figure out how to target the field I’m after.

This must seem like a super novice question, but if someone can explain fundamentally how this is supposed to work I would be very very grateful.

I´m sure its possible too, but I gave up and do a delete and then re-create.

1 Like

Hi @user23,

in order to understand your trouble better, I would need to know:

  • what backend do you use? Is it Firestore?
  • what error message do you get?

In any case, these posts might help you:

Hi @stayfoolish , thank you for the reply!

I am actually currently using Airtable as my backend. Not sure how that might change your recommendations?

Unfortunately, I’m not familiar with AirTable.

Is it fundamentally different though? Maybe I’m making this sound more complicated than it is. Being able to update records from your app seems about as basic as it gets; so basic in fact that that the tutorial “Data & Integrations” didn’t even bother to go over it.

I understand some of the specifics will be different depending on the API, but I don’t even understand what to do with the screenshot above in order to test the data. Why are these the properties being given to me? From this screen, how do I communicate what I want to update?

Basically when updating a document,

  • it will will keep the document-id,
  • but replace all fields by the data you provide in the http request. This is why the schema asks for all the fields.
  • If you do not fill fields, these fields will be deleted (for some fields like ‘createdTime’ the backend might automatically fill them)
  • for updates the methods PUT and PATCH can be used. In the case of Firestore, only the PATCH method is supported. Therefor you should check, that the method of your request matches the requirement of AirTable.

You can set a ‘custom schema’ but it is easier to:

  • test the GET method in AppGyver
  • click ‘Set schema from response’

In Firestore (and also most likely in AirTable) it is also possible to update only certain fields. This is done by using ‘mask’. But using ‘mask’ would be the second step. At first you should ensure that the basic update works.