How to stop database from updating to blank values

Options

Hello, I'm facing difficulties when it comes to updating values in my database. To make it more convenient for you to understand the issue, I've created a video walkthrough. Kindly view it at the following link: . Regards. https://www.loom.com/share/16c03d6aed9a4481a219279a2919f19f?sid=19e1760d-a4d2-4a79-8008-a829595524a5

Best Answers

  • tig1893
    tig1893 Member
    edited October 2023 Answer ✓
    Options

    HI Louis

    followed that but still up dating with a blank value..😤 any other ideas here is a video explaining -

    https://www.loom.com/share/835d5ff4f185450bb23b36f0d78bc4fa?sid=97979a1a-40f8-485d-82e6-69114cebced5

  • Xavier Agapé
    Xavier Agapé Member
    Answer ✓
    Options

    Hi @tig1893 ,

    It seems like you may not have configured your "get record" to store your old values in the event of an empty input, which is exactly what @Louis Machado - CSA pointed out.

    Here's a step-by-step guide to resolve this issue:

    Step 1: Create a "get record".
    Step 2: Update your "edit record" by employing the ifnotempty filter on your the fields.

    In the ifnotempty filter, be sure to insert the information retrieved from your "get record". This will ensure that your old values can be used instead of the empty input.

  • tig1893
    tig1893 Member
    edited October 2023 Answer ✓
    Options

    Thank you, everyone! It's quite amusing that even after aligning and configuring everything correctly (I think), I still couldn't make it function. So, I decided to remove the call entirely and then rebuild it, and lo and behold, it worked perfectly on the first try.😍🤣

    Thanks Xano community! Great support from Louis out side the forum also ⭐️⭐️⭐️⭐️⭐️⭐️

Answers

  • Louis Machado - CSA
    Louis Machado - CSA Administrator

    ADMIN

    edited October 2023
    Options

    Hello, Tim! In order to do this, you will:

    - use a GET RECORD function to pull the record from the database. You want to edit the new record with the existing data unless the input is populated. In this case, you want to store this value in the record.

    -Right after the GET RECORD, you're going to use an EDIT RECORD function and the ID or any field name/value should be the same. If you click on the magic wand icon in the middle of the settings of the EDIT RECORD function, you will be able to automatically map the fields with the output variable of the previous GET RECORD

    - Then, you will use a filter called SET_IFNOTEMPTY in the value inputs you want to update, and the values of this filter will be the inputs.

    All this process can be seen in the loom video below

    https://www.loom.com/share/c0db20190558420887c5663975e0fee8?sid=b695c3ea-83a6-40b7-ac42-02f3f78e4339