Are There Any New Pre-Service Worker Disruptive Techniques?

Ⲇanom the ultimate (Dan Diebolt), Champion

- 29,254 Points

Posted 1 year ago

Ⲇanom the ultimate (Dan Diebolt), Champion

- 29,254 Points

Sure there are!

I just slapped together three simple formulas the other day but did not give the common technique a snappy name. How about the

https://haversineconsulting.quickbase.com/db/bm5f3b6ra?a=td

Well the thing that is special about this new formula is that I

I want to do a little more testing on some more complex JavaScript input but I will be releasing this utility shortly.

Anyway that's the

I just slapped together three simple formulas the other day but did not give the common technique a snappy name. How about the

**OEH Technique**- the**O**n**E**rror**H**TML**Technique**named of course after the "*" chant sung by the***O**oo -**e**eeee -**h**oo!**Winkie Guards**in the**Wizard of Oz**(that is what they are singing - it is in the script if you don't believe me):**Well I added fourth formula to the demo which calculates all the**

**prime numbers**less than the value in the field**[Number]**. You can check it out here and even add your own records:https://haversineconsulting.quickbase.com/db/bm5f3b6ra?a=td

Well the thing that is special about this new formula is that I

__didn't__write the formula! Here it is but I swear I didn't write this formula:"<img srcInstead I created a very small form to generate the formula from some simple JavaScript pasted into the form. Have a look at the screenshot of the form in action:onerror='this.outerHTML=( function(max) { var sieve = [], i, j, primes = []; for (i = 2; i <= max; ++i) { if (!sieve[i]) { primes.push(i); for (j = i << 1; j <= max; j += i) { sieve[j] = true; } } } return primes.join(", "); } )(" & [Number] & ")'>"

I want to do a little more testing on some more complex JavaScript input but I will be releasing this utility shortly.

Anyway that's the

**OEH Technique**. It generates a QuickBase formula that displays whatever you want to calculate on your forms and reports and can include arbitrary HTML content. The generated formula is self contained and does not reference any code pages or other external resources.(Edited)

Ⲇanom the ultimate (Dan Diebolt), Champion

- 29,254 Points

Just an quick update - it looks like we are just going to use a

**Service Worker**to splice the OEH formula generator into the standard field definition page. When you select the checkbox**"Enable OEH?**" you can then enter your JavaScript and field inputs and the QuickBase formula will be auto-generated without the need to click any extra buttons. Also, so nobody accidentally corrupts the generated formula definition we will make the normal formula entry field**readonly**. The interface looks like this:(Edited)