Discussions

Expand all | Collapse all

API_ImportFromCSV: update_id documentation

  • 1.  API_ImportFromCSV: update_id documentation

    Posted 4 days ago

    update_id

    Attribute of each rid element that defines the update_id for the record.

    Update IDs are used to detect update conflicts in subsequent operations with API_EditRecord.


    Researching the Quicbase API documentation and trying to understand Response values for update_id. I am not understanding how this is used. Does this make sense to anyone and can you help explain what am I missing?

    ------------------------------
    Jim Harrison
    transparency = knowledge + understanding : The Scrum Dudes
    ------------------------------


  • 2.  RE: API_ImportFromCSV: update_id documentation

    Posted 4 days ago
    Edited by Austin K 3 days ago
    Looking at the documentation for API_EditRecord to me it seems like update_id is used to prevent you from editing a record that has recently been edited. Say your script grabs the record information with API_GetRecordInfo first, that will give you the current update_id. Then have your script run and transform whatever it needs to have and when it comes time to do the actual editing of the record you can again grab the update_id and compare it to the current one. If the id does not match then you know the record was updated at some point during your scripts operation and you should probably abort and grab the record information again?

    Not sure if that is how it is meant to be used or not. It does say it "Specifies the latest record state." so maybe it can be used differently but that is what I can come up with as an idea. I would be interested to know how else it might be used...

    I know you specifically mentioned the csv command but I often find more information about things like update_id by looking all over the documentation. I know it isn't ideal. What I typed above would make sense as I am sure importing a csv calls the edit record function in some way if it needs to be changed. That Quickbase magic that is not shown to us so only a guess on my end there.