option for "existing value" to filter on in EDIT A RECORD

Options

Unless I am missing something - currently, when you want to merge or append a value(s) to an array in field of a record in EDIT RECORD - you have to GET the record first.

Then use dot notation from the response of the GET RECORD call for the value of the array in the EDIT RECORD - and merge/append, etc. on that with a filter.

Seems like it would be more slick if you just had an option for "existing array" or something to that effect in the EDIT record - so you could just apply merge/append, etc. with a filter(s) onto the existing array - vs having to do the step of GET RECORD.

Comments

  • arturosanz
    arturosanz Member ✭✭
    edited October 2023
    Options

    What do you mean with an "existing array"? Could you give us a specific example to understand what you want to achieve?

    Keep in mind that when you call Edit Record, it locates the record and substitutes the record fields you have chosen to edit WITHOUT reading the record contents prior to the modifications you are going to make. Selected fields' content are substituted completely, so if you need to update only a partial content of a list field, you have to get the current list field content into a variable first with Get Record, then apply changes to the variable, and then substitute the list field content with the updated variable with Edit Record.

    What you propose would mean that Edit Record would always have to call Get Record internally to expose the record contents prior to the edition. Rather than being only a WRITE operation, it would be a READ operation plus a WRITE operation always. But this won't be efficient because in many cases you don't need to know the previous data stored to edit records' content.

  • Orbiter
    Orbiter Member
    Options

    Hey @arturosanz - yeah, after reading your post I realize that of course it's way more efficient to do it the way XANO currently does it. So, I would revise my feature request to:

    Create a GET and EDIT Record request - like how we have ADD and EDIT Record as a single request.

    I am working with a lot of tables with a lot of arrays that need to be constantly merged and appended - and it would be nice IMO to have a single no-code request for doing this.