PATCH without overwriting with null an existing value

  • uunicode-1330883185256566865

    unicodes

    19 days ago

    How do you update a table without overwriting with null an existing value?
    I would like to avoid functions for this. Thank you!
  • needtheanswers-1330901923020275712

    needtheanswers

    19 days ago

    what backend are you using? xano?
  • uunicode-1330904620276518923

    unicodes

    19 days ago

    Supabase
  • erikbeus-1330905307848638484

    Erik Beuschau

    19 days ago

    You make sure only to specify the columns you want to update. Supabase/postgrest will leave everything else intact https://postgrest.org/en/stable/references/api/tables_views.html#update
  • uunicode-1330913034926952478

    unicodes

    19 days ago

    In case the update is made two times, and first time was everything added (any column) and in the second update is missing avatar, it will update it with null. ps: consider arrays as variables
    1330913034700324974-Screenshot_2025-01-20_at_16.49.50.png
  • I do not find any Prefer to let the existing avatar in db and ignore the new avatar if null.
  • erikbeus-1330915673269997578

    Erik Beuschau

    19 days ago

    If you want to exclude the avatar from your Object, you could use the Delete formula. You must ensure to only send the relevant data - either in your API definition, in a variable or as an input to your API
  • uunicode-1330916865828065321

    unicodes

    19 days ago

    Ahhh, you are right! I was looking to build object dynamic but you are right, it could be edited after!
  • Thank you Erik!
    👍1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.