Skip to main content
Solved

QuickBase Scripts

  • Oct 22, 2024 8:57 PM UTC
  • 0 replies
  • 460 views

Forum|alt.badge.img+3

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.

Best answer by MarkShnierYou

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.

View original
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
  • Qrew Champion
  • Answer
  • Oct 23, 2024 12:16 AM UTC

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.


bensimon
Forum|alt.badge.img+14
  • Quickbase Alumni
  • Oct 23, 2024 2:54 PM UTC

Very clever indeed, MarkShnier__You