ContributionsMost RecentMost LikesSolutionsRe: Save new record, pause, refresh Here's a version of Jeremy's code that worked for me. <html> <head> <title>Please wait</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .spinner { border: 4px solid rgba(0, 0, 0, 0.3); border-top: 4px solid #007bff; border-radius: 50%; width: 40px; height: 40px; animation: spin 2s linear infinite; display: none; /* Initially hidden */ } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <script> function showSpinner() { const spinner = document.getElementById("spinner"); spinner.style.display = "block"; // or "inline-block" or "flex", depending on the context } function run() { showSpinner(); // Incorporate a 2 second delay setTimeout(() => { // Get the value of the 'rid' parameter from the URL const urlParams = new URLSearchParams(window.location.search); const rid = urlParams.get('rid'); // Redirect back to record window.location.href='https://YOURREALM.quickbase.com/db/DBID?a=dr&rid='+rid; }, 2000); } </script> <body> <div id="spinner" class="spinner"></div> <script> run(); </script> </body> </html> Once that's saved as a code page and the YOURREALM and DBID are replaced, refer to this excellent response on how to make a button to save a record, then get the newly created record id from it. Here's what my save button rich text formula looks like, based off Mark's code from the link above, which wisely checks to see if the record is new or not first (be sure to replace the codePageId with the id of your code page): var number codePageId = 14; var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%"); var text codePagePause = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID="&$codePageId&"&rid=" & $RID; "<a class='SaveBeforeNavigating Vibrant Success' data-replaceRid=true href='" & $codePagePause & "'>Save</a>" The button saves the record then redirects to the code page, inserting the newly created rid (%%rid%%) as a url parameter. When the page loads, it will pause the two seconds, then read the record id from the url parameter, and insert it into a link and redirect back to the record. If you really wanted to get fancy, you could pass as a parameter the dbid of where the button was clicked, then you could copy the button to any table in your realm you want a save and pause in. ------------------------------ Steve Davidson ------------------------------ Re: Chicken Tracking with QBHi Keith, thanks for the tip! I'm definitely going to look into those links. Do you mind if I ask what you used your readers for? Since starting this project, I've had a lot of other ideas for things to track location and inventory of around here that could be useful, especially if I could get a couple-foot range read out of them! ------------------------------ Steve Davidson ------------------------------ Re: Chicken Tracking with QBHi Chelsea, That's pretty much exactly what I was thinking for that, or maybe having two scanners, close to each other in order to sort of determine a direction of travel of the chickens, to ensure that they're actually in and didn't just stop in the door before wandering back out. Another thought I had was to somehow wire up their roost to detect when all the chickens have gone up to sleep, and use that to ensure that they're all in and ready for the door to be closed. In talking with a couple friends, the ideas of weight sensors on the roost, or even object detection with a camera that's already out there could be a way too. We have a lot of predators around here, so keeping that coop door closed at night is very important! The chickens I have currently are usually in before it's too dark, and I think for them I could probably get away with closing and opening it just on a time schedule, but ultimately it'd be nice to know that nobody gets locked outside accidentally. You're right though, for opening the door, it could be just as simple as even programming in the time based on normal sunrise for that time of year. Also, your mom has quail, ducks and turkeys too? I'm very jealous! Ducks and turkeys are a lot of fun! ------------------------------ Steve Davidson ------------------------------ Re: Chicken Tracking with QBHi Maria, fine looking flock! They're so cute at that fluffy stage. And I love your watering system-- what a great way to keep little playful chicks from spilling water all over everything and soaking the bedding! Here's a few more details about each piece. The most important thing to look for when looking for readers and scanners is to look at the frequency of them, and make sure they match. There's basically low frequency and high frequency. I got the low frequency (125KHz) because they don't need batteries and are a lot cheaper. The drawbacks are that they need to be real close to the scanner to be read, and information-wise, only hold a number, and can't be reprogrammed. Since this was connecting to quick base, that's not a big deal. There is also low-frequency RFID that operates at 134.2KHz, that would allow you to write information to, and some of which are compatible with the chips that are put in pets for identification, and hold more information. I stuck with the cheap 125KHz ones, because of cost, and all Quick Base needs to know is a unique value to link it to other information. Another really important thing is to pay attention to is the size of the band that goes around the chicken's leg. - specifically, the opening, to make sure it's big enough to fit around the chicken's leg comfortably. My chickens are full-size, and breeds that are on the larger side, so the bands with an inner diameter of about 17-19mm (11/16"-3/4") fit pretty well for them. There were a lot for sale that were very small, made I think for racing pigeons or something, so make sure that the inner diameter is not too small. There are plenty of sellers selling these things on AliExpress where I got them, so just verify that the frequency and the size are what you need before buying. Generally, they're sold in lots of varying size. I ended up getting a lot of 100, for about $27. Smaller lots make the price per each a bit more, but I figured having extra ones to play around with couldn't hurt either. As for the readers, the one in the picture I posted is very common all over the place, and is about as basic as it gets. It says "Windows" on it, but works with the Linux that is installed on the Raspberry Pi too. It's USB, which makes connecting it to the Pi easy, and was just over $5 on AliExpress. The same exact one sells for as much as $20 in many other places, so shop around until you find a good deal. There are larger scanners out there, which are about 9" x 9", but for some reason are about $170. I've seen some YouTube videos of people making their own, but it gets to be an electronics project very quickly, so the simple USB was good to start with and proof-of-concept it. The Raspberry Pi Zero W is the brains of the operation. It's about $15 by itself, or there are kits on Amazon with a power cable and case for about $26. Make sure it's a Pi Zero W, the W means built-in WiFi, which is important because it only has 2 micro USB ports that are used up by the power cable and the RFID scanner. On the Pi Zero is standard Raspian Jesse operating system. I'm not so good at Linux yet, so I chose Jesse, which has a GUI like windows, which made setup easier. I wrote a simple Python script that when a number is typed in, it goes to my Quick Base account using the API and adds a record. It doesn't open a browser window when it does it, just loops back and waits for another number to be entered. Since it was running out in the barn with no keyboard or monitor, there was a setup command to do in Linux to make the python script run at startup. If you were to plug a monitor into it while it runs, you'd see a window with a blinking cursor just sitting there, awaiting input. Probably not the most elegant solution, but it works. I also programmed one of the RFID tags to run a shutdown command if it's scanned, to safely turn off the Raspberry Pi if it needs to be moved. This is what I did with mine-- it was pretty much put together as cheap as possible to test the concept. Changes or more additions could be useful, but there are some trade-offs, so at this point if I were to do anything different it would be a bigger scanner. But for the cost of them, as well as the extra electronic wiring work involved, I'm still looking at other options. For a start though, this has been a pretty good setup. Hope that helps, I'm not sure about the policy here of posting direct links so I didn't link to anything specific, but the RFID bands and reader was from AliExpress and the Pi was from Amazon. ------------------------------ Steve Davidson ------------------------------ Re: Chicken Tracking with QBHey thanks Ronda... it's been fun to use Quick Base for something a little different. Using geofencing would be really cool. The tags and scanners need to be really close to each other to read, so it could be more a matter of funneling them through various enter/exit points. Using tags that use bluetooth or wifi and geofencingto determine their location would be really fun to do - maybe end up with a map with little dots moving around in real time. They are a bit more expensive though, and I know that Ginger might not be happy with a bulkier tag. She can be a bit dramatic sometimes, but maybe it'd be worth it to get a couple and figure out a good way to see if it could work. ------------------------------ Steve Davidson ------------------------------ Chicken Tracking with QBHere'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. ------------------------------ Re: How do I create a form that has some pre populated information from another table and allow a non-user to answer questions on that form?This might be something that is limited by account type or your user permissions, but you can send a copy of a record to an email address of a non-user by creating an automation and selecting "Open: Emails sent openly to anyone" option if it's there. You can display only the fields you want, and include a link back to a form to update the information if necessary. Since you'd have to open up the permissions to allow for anyone with the link to edit the record, it'd probably be best if the link was an add record button for a second temporary table with add permissions, then when saved another automation could copy the data to the proper master table record to update the record (and probably delete the temporary table data). To fire the initial automation, a "last updated" date field could be added to the person's record, so you could see when the last time they were asked to verify the information. When you want to verify it again, change the date to the current day and have that trigger the automation. You could probably even send off verification emails to many people at once by changing the "last updated" field on many records at once. But you may run into limits of how many automations can go all at once.Re: Slow Down the RefreshDon't thank me, thank you guys who have taught me all the cool stuff I know in quick base through all the peoples questions you answer.Re: Slow Down the RefreshHere's Chayce's code with a bit of a tweak that seems to be working: "javascript:" & "$.get('" & $URL & "',setTimeout(function(){" & "location.reload(true);" & "},2000));" & "void(0);"