Skip to main content

Updating YoomDB Records in Order, Starting with the Oldest Entries

As of Nov 29, 2023

Yoom Customer Service avatar
Written by Yoom Customer Service
Updated over 2 weeks ago

Q:

We’ve set up a "name" column and a "code" column in our Yoom database. All the values are currently in the "code" column. When a Flowbot is triggered under specific conditions, can we update the "name" column, starting from the oldest "code" first?

A:

Yes, it is possible.

By default, YoomDB updates records from the newest entries first. Unfortunately, there's no direct way to reverse this order. However, we’ve outlined a workaround to help you update the records starting from the oldest entries.

🙌 Try out this Flowbot sample: Flowbot Sample Link


🛠 How to Set Up the Flowbot

Overview

To ensure the updates happen from the oldest records first, you need to:

1️⃣ Identify the oldest code (the last entry in your dataset).
2️⃣ Use a spreadsheet function to extract the oldest code.
3️⃣ Update the Yoom database accordingly.

Step-by-Step Setup

1️⃣ Retrieve All Target Records

Goal: Retrieve all records where the "name" column is empty, but the "code" column is filled.

Settings:

  • Action: Retrieve multiple records (Max: 500)

  • Search condition:

    • Name is empty

    • Code is not empty

2️⃣ Insert Retrieved Codes into a Spreadsheet

Goal: Store the list of retrieved codes in a spreadsheet for further processing.

Settings:

  • Integrate with Apps: Google Sheets

  • Action: Enter Value into Cell

3️⃣ Extract the Oldest Code Using Spreadsheet Functions

Goal: Use a spreadsheet function to identify the oldest record from the list.

How to Set Up:

Use spreadsheet formulas to identify the last entry in the dataset.

  • Enter this formula in cell C1:

    =SPLIT(B1,",")

  • Enter this formula in cell A5:

    =TRANSPOSE(C1:1)

  • Create another sheet to get the oldest code:

    =INDEX(Sheet1!A5:A, MAX(MATCH(MAX(Sheet1!A5:A)+1,Sheet1!A5:A,1),MATCH("",Sheet1!A:A,-1)))

4️⃣ Retrieve the Processed Code from the Spreadsheet

Goal: Fetch the oldest code from the spreadsheet to update in YoomDB.

Settings:

  • Integrate with Apps: Google Sheets

  • Action: Retrieve Value

5️⃣ Update the Yoom Database with the Oldest Code

Goal: Use the extracted oldest code to update the database.

Settings:

  • Integrate with Apps: Yoom

  • Action: Update Record

  • Search condition: Code = {{Retrieved Value}}


🚀 Try It Yourself!

  • Use the Flowbot Sample! → Click Here

Search Keywords

Yoom database, database, old, oldest first, record, update

Did this answer your question?