Forum Discussion

ChrisDyroff's avatar
ChrisDyroff
Qrew Member
4 years ago

Toggle Checkbox for Whole Table

Hi All,

What's the best way to set a value on every record in a table? Best solution would be something I could call with the API, OK solution would be something scheduled, unacceptable is anything manual.

Workflow/Use Case
  1. Flip all records in the table to Exists=False (Exists is a checkbox field)
  2. Load (POST to /records endpoint) my data from an external system, each record has Exists=True
  3. Now any records which weren't in the last load are still marked Exists=False
  4. Profit. Or at least have an accurate representation of the current state of the other system.

Thanks,
CD

------------------------------
Chris Dyroff
------------------------------

3 Replies

  • The easiest way to mass update our records and the table is to create a saved a table to table import where are you map the records into themselves based on matching record ID and just update the single field with the formula field which is a checkbox field with the formula of false.

    This can be put into a URL formula button that the user presses or this could be run on an overnight scheduled automation.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • ChrisDyroff's avatar
      ChrisDyroff
      Qrew Member
      Hi @Mark Shnier (YQC),

      Thank you for the quick reply! I hadn't thought of saved imports. I was able to import the table to itself, and map a new formula checkbox field (=False) to the target Exists field I want to flip. Awesome advice.

      My only issue now is controlling how it executes. In Automations/Scheduled, I can only select "Daily." But when will it run? I need to know so I can schedule my import only after this runs. Can Pipelines help here?

      Thanks again for your thoughts.​

      ------------------------------
      Chris Dyroff
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        Daily Automatons run at an unpredictable time sometime between your midnight and about 5:00 am.

        Here are my cheat notes on how to all an API from a Pipeline

        Webhook.
        Make Request
        a bunch of the top fields are left blank

        URL
        https://mycompany.quickbase.com/db/bqhgyfyzv  (table with the saved import target)

        Method
        POST

        (more)

        Content Type
        Application/XML

        (strangely, the Body is entered next but when saved comes back in the sequence below)

        Headers (list)
        Name
        QUICKBASE-ACTION

        Value
        API_RunImport

        Body
        <qdbapi>
        <apptoken>cqweqyduxxxxxdffk3uydkdk2ta</apptoken>
        <usertoken>bxv4tx_wvexxxxxxbrzdmxjzeq9tdwkqihm</usertoken>
        <id>10</id>
        </qdbapi>


        in the above "10" id of the saved import from the URL

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------