Chicken Tracking with QB
Here's my latest cause for Quick Base celebration: A while back I made a Quick Base app for tracking my flock of chickens and supply inventory, but just incorporated RFID scanning to help move toward automatically tracking egg production instead of manually tapping URL formula buttons. Very much still a work in progress, but here's what it does so far and how it works: The app keeps records of what chickens are in the flock, egg production, store health records, supply purchasing/use, and a journal to write entries about any or all of the chickens. One night I was browsing my favorite overseas merchant website and came across these leg bands for fowl that contain an RFID chip. They were about $.27 a piece, so I bought a bunch, and a cheap USB RFID reader too. I created a table of all of the RFID tags, and a table for scanner entries, and linked each chicken to an RFID number, so that when one was scanned the entries table would "know" who the chicken was. Then I needed the scanner to be in a stationary place ready to scan anytime, so I wrote a little Python script that sits and waits for a scan, and when it detects one creates a record in the entries table using the Quick Base API. I decided to put the scanner in the nest box to find out who was laying eggs and when. It's also a confined space where I thought I'd have the most luck with the RFID system, which is the low-frequency passive type (chosen because they're cheap and don't require batteries or charging. The trade off, however, is that they only get scanned when they are close enough to receive power from the scanner). After hiding the scanner under some straw on the side of the nest near where the banded leg would be, the Raspberry Pi was put outside of the nest on a nearby shelf. With everything set up, connected to the network and seemingly working, it was time to put the bands on the chickens: Over the next few days of anxiously awaiting email notifications of scans, I finally got about 40 one morning over the course of about 45 minutes, all from the same chicken. I've had some luck so far, but have been looking into a more powerful scanner that would ensure scans without the RFID chip needing to be so close to the scanner. (Since putting in the scanner I've also found a couple of bushes the chickens have been laying eggs under since they have the run of the yard in summer, but with winter coming they should be laying more inside). I'd also like to add more scanners in various locations, but that may depend on what can be done to find a scanner that could read at a longer distance. I also need to find a better way to display some of this data, especially if its coming from multiple scanners. I'm thinking a summary type table that would group by location and calculate duration to show how long a chicken was in a given spot over the course of a day. A way to detect if an egg is actually laid, and automatically log that in the egg table for the correct chicken is also a future addition once the best way to do that is figured out. Ultimately, it'd be cool to have scanners that could also track various spots to get an idea of how they spend their days, and know when they're all inside for the evening and automatically close the coop door for the night. If anyone has any ideas about any of this, or experience working with RFID or Raspberry Pis and Quick Base, I'd love to hear about it! ------------------------------ steve. ------------------------------102Views11likes13CommentsShading on Date Field Calender pop up
I'm want to know is there a way to change the shading of the days on the pop up calendar on a date field? The pop up calendar shading is very light, so you really tell what today's date is because the shading for today's date is almost exactly the same as all the other days. Is there a way to modify this? As you can see from the screen image, you can barley tell that the 5th is today._ _11Views4likes4CommentsStop automatically adding new fields to reports.
Here's the problem. Whenever I create a new relationship and add lookup fields or summary fields, QB attaches the new fields to reports. How do I stop this from happening? Is there a universal app setting where I can set the program to "not add new fields to reports" similar to the "When new fields are created Do Nothing" option for forms?8Views4likes4CommentsForms, Tables, HTML Add some spunk to your forms. Add formatting to your forms.
If you want to add a bit of separation to your form I stumbled onto this. Maybe it's published but this works. See attached video So you have "TABS" and "Text" for form formatting. Well, let's say you want to delineate an area in a form by putting a box around it. Editing Form: 1: (first "text" element.) <table style="width:100%;border:1px solid black"> 2: (last "text" element.) </table> You can encompass many fields on your form by putting the </table> further down. ------------------------------ Douglas Folk ------------------------------37Views4likes7CommentsThe Jan 21st UI Update
The Jan 21st UI Update is awful. Our company uses many forms that span without having to scroll horizontally. We now have a bunch of forms that are scrolled off the screen. Terrible. Please give us the option to go back the the basic "blue". We did not ask for this update, nor did we want it.9Views4likes67Commentshow do I create a button that allows the user to continue to the next tab
We are creating a public form with multiple sections. Using the new tab section makes the form looks a lot neater, which is great, but there doesn't seem to be a way for us to indicate to the user where they are in the form and direct them to the next tab. Does anyone know how to create a button where the user can be redirected to the next tab? Or save and redirect to the next tab, or a field that is in the next tab? Also, this is a very noob question, but where can I find the urlfor my form which removes the Quickbase header and tabs? And how do I embedd the form into an iframe? If it's embedded in an iframe, when I look at it on a mobile, does it default to the QB mobile view? Thanks in advance105Views3likes27CommentsHow do I make a random color button?
We had a user request this thinking since there is no random command it could not be done. We tried a few methods but found a native method that works best and is really fun. First create a rich text formula field that will generate the random color - [Randomish Button Color] Note: We used Now() and built in fields to generate the Base 16 and at the bottom we have only listed 20 permutations of the over 700 available. var text hh = Case(ToText(Mod(Hour(ToTimeOfDay(Now())), 16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); var text mm = Case(ToText(Mod(Minute(ToTimeOfDay(Now())), 16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); var text ss = Case(ToText(Mod(Second(ToTimeOfDay(Now())), 16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); var text ms = Case(ToText(Mod(MSecond(ToTimeOfDay(Now())), 16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); var text dd = Case(ToText(Mod(Day(ToDate([Date Modified])), 16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); var text zc = Case(ToText(Mod(Day(ToDate([Date Created])),16)), "0", "0", "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9", "10", "a", "11", "b", "12", "c", "13", "d", "14", "e", "15", "f", ""); // Permutations Case(Mod([Record ID#],20), 0, "#"&$mm&$dd&$hh&$ss&$ms&$zc, 1, "#"&$ms&$hh&$zc&$dd&$mm&$ss, 2, "#"&$ss&$mm&$ms&$dd&$hh&$zc, 3, "#"&$zc&$mm&$hh&$ss&$ms&$ms, 4, "#"&$zc&$mm&$ss&$hh&$dd&$ms, 5, "#"&$ss&$dd&$mm&$ms&$hh&$zc, 6, "#"&$hh&$zc&$mm&$ms&$dd&$ss, 7, "#"&$ss&$ms&$hh&$mm&$dd&$zc, 8, "#"&$hh&$ms&$ss&$mm&$zc&$dd, 9, "#"&$dd&$mm&$hh&$zc&$ss&$ms, 10, "#"&$dd&$ms&$mm&$ss&$zc&$hh, 11, "#"&$zc&$mm&$ss&$ms&$hh&$dd, 12, "#"&$mm&$hh&$ss&$dd&$ms&$zc, 13, "#"&$ms&$ss&$dd&$hh&$mm&$zc, 14, "#"&$mm&$hh&$ms&$dd&$ss&$zc, 15, "#"&$zc&$ss&$dd&$hh&$ms&$mm, 16, "#"&$zc&$hh&$ms&$dd&$mm&$ss, 17, "#"&$ss&$hh&$dd&$mm&$zc&$ms, 18, "#"&$mm&$hh&$dd&$ms&$zc&$ss, 19, "#"&$ss&$ms&$zc&$hh&$dd&$mm, "") Then create a formula checkbox field that will determine if the text should be black or white. [Threshold] - var number threshold = 105; var text R = Right(Left([Randomish Button Color],3),2); var text G = Right(Left([Randomish Button Color],5),2); var text B = Right([Randomish Button Color],2); var text RL = Case(Left($R,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var text RR = Case(Right($R,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var text GL = Case(Left($G,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var text GR = Case(Right($G,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var text BL = Case(Left($B,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var text BR = Case(Right($B,1), "f", "15", "e", "14", "d", "13", "c", "12", "b", "11", "a", "10", "9","9", "8","8", "7","7", "6","6", "5","5", "4","4", "3","3", "2","2", "1","1", "0"); var number Rvalue = (ToNumber($RL) * 16 + ToNumber($RR))*0.299; var number Gvalue = (ToNumber($GL) * 16 + ToNumber($GR))*0.587; var number Bvalue = (ToNumber($BL) * 16 + ToNumber($BR))*0.144; If(255-($Rvalue+$Gvalue+$Bvalue)<$Threshold, true, false) Now you have the 2 pieces and need to create the rich text formula button - // Begin button style var text bgcolor = [Randomish Button Color]; var text txtcolor = If([Threshold]=false,"white","black"); var text style = "style=\"text-decoration: none; box-shadow: 3px 3px 1px #888888; background:" & $bgcolor & "; border-radius: 3px; padding: 5px 8px; color: " & $txtcolor & "; display: inline-block; font-weight: normal;font: bold 700 24px/1 \"Calibri\", sans-serif; text-align: center; text-shadow:none;"; // End button style "<a " & $style & " href=\"javascript:" & "$.get('" & $URL & "', function(){" & "location.reload();" & "});" & "void(0);\">Crazy Button Name</a>" Note: $URL is the variable you can create to perform the button actions and the button is designed to return to any location that the button is used.9Views3likes7CommentsMost powerful examples of javascript/jquery with IOL technique
We are beginning to refine our QuickBase application, which until this point has relied solely on native-QB UI. Using the IOL technique I now have some very basic jQuery code applied to some UI elements in my application. I'm eager to learn more, and I'm wondering just how far others have been able to take this approach to enhance QB's native UI. Would any of you be willing to share some links to examples of what you consider the most powerful UI enhancements using javascript/jquery via IOL? Thanks in advance!14Views3likes7CommentsHow best can I obfuscate/encrypt URL query parameters that are passed to a code page on our database?
Hi all! I was asked to develop an app that can present records associated with a particular user in a printable 8.5x11" worksheet-style form. As of now, I accomplish this with a URL button field that links to a code page with a "?userEmail=abcde@email.com" tacked onto the end. My javascript code takes the email from the URL, inserts it into an API_DoQuery, and uses the results to populate the worksheet. My question is: what's the best way I can keep a user from changing the URL to see somebody else's records? My initial thought was to change the URL parameter and base64 encode the email to get something more like "?x=YWJjZGVAZW1haWwuY29t" which is probably obfuscated enough considering that most of the users wouldn't be savvy or interested enough to figure out how to look at other people's records. Honestly none of the records contain terribly sensitive information. Simple base64 obfuscation would probably serve fine. But maybe one of you has a more secure method of accomplishing this outcome! Maybe using an application variable as a key? I don't know but I'm interested in finding out. Thanks in advance for the help!45Views3likes0Comments