Forum Discussion

EdH's avatar
EdH
Qrew Member
2 months ago

QuickBase Scripts

I have top tier QB enterprise access.  I need a way to build and run a script within QB and have it systematically run it on a schedule.  what I want to do can't be done with the default pipeline builder.

I have a table that has a ticket number, open date, resolution date and a check box called Hard Down.  The objective is to review each ticket ticket and determine if it was open at 7:30 am each day and has the Hard Down box checked.  For every day the ticket was open at 7:30 am, we will insert the ticket number and the date it was open into a separate table.  For example, if a ticket was opened on 10/3/2024 at 09:00 am and resolved on 10/6/2024 at 06:45 am.  There would be 2 rows added to the Hard Down Trends table for dates (Ex. INC00000001234567 10/04/2024 and INC00000001234567 10/05/2024).  We would not include 10/3 because it was created after 7:30 am.  We would also not include 10/6 because it was resolved before 7:30 am.

With all of that said, believe it or not, I have it built out and working in a code page.  Anytime someone loads the page it will run through this 83 line HTML/JS code.  

Here is where I need help.

  1. Is there a way to run a coded page on a schedule or through a pipeline?
  2. Is there a better place to put a script that will run on a schedule? 
    1. MS Copilot and Google's Gemini keep telling me there is an option within the pipeline to run a script, but I can't find it anywhere.
    2. Ultimately I don't care were it is or what language it is in.  I just want it to be contained within QB and run by QB.

Any thoughts are appreciated.

  • Wel you say this:

    Ultimately I don't care were it is or what language it is in.  I just want it to be contained within QB and run by QB.

    Great, just do an easy simple native Pipeline to run at 7:30 each morning (Pipelines can be scheduled to run daily at a particular time), scan for qualifying records, and then the For  Each loop either directly add the records, or else have a step before the Search to create a bulk upsert and add a Bulk Upsert row inside the for each loop, and then outside the loop Commit the Upsert.

    "Best Practice", if there will be a lot of records it to build a Bulk upsert as that keeps the processing outside Quickbase as the upsert is very fast in Quickbase, nd only happens once.

  • Wel you say this:

    Ultimately I don't care were it is or what language it is in.  I just want it to be contained within QB and run by QB.

    Great, just do an easy simple native Pipeline to run at 7:30 each morning (Pipelines can be scheduled to run daily at a particular time), scan for qualifying records, and then the For  Each loop either directly add the records, or else have a step before the Search to create a bulk upsert and add a Bulk Upsert row inside the for each loop, and then outside the loop Commit the Upsert.

    "Best Practice", if there will be a lot of records it to build a Bulk upsert as that keeps the processing outside Quickbase as the upsert is very fast in Quickbase, nd only happens once.

    • EdH's avatar
      EdH
      Qrew Member

      Clever.  I never thought of that because I am only pulling over the resolved tickets from our ticketing platform, not the tickets still open.  This might be reason enough to change that. 

      Thinking out loud: If I ever needed to recreate the entire dataset, I can do that with my coded page on demand.  However, the day-to-day incremental updates can be done in a much simpler way.

      Thank you very much.