Video: Formulas 101 | Duration: 3680s | Summary: Formulas 101 | Chapters: Welcome to Formulas (1.4399999s), Formula Basics Overview (136.305s), Understanding Quickbase Formulas (241.29s), Understanding Formula Types (402.57s), Formula Field Basics (604.81995s), Formula Fields Explained (1080.695s), Formulas and Calculations (1730.5s), Advanced Formula Techniques (2405.825s), Formula Writing Resources (2814.65s), Q&A and Performance (2980.89s), Formula Function Deep Dive (3259.71s), Dynamic Dropdown Solutions (3414.315s), Advanced Formula Concepts (3507.6501s), Conclusion and Resources (3625.99s)
Transcript for "Formulas 101":
Hi, everybody, and welcome to today's webinar, formulas one zero one. I'm Evan, and I'll be your host for today. We're gonna get started in just a minute. We're gonna let a few more stragglers funnel in. But while we do, I would love to know how much how familiar is everybody with formulas who is joining us today? I'm gonna open up a poll so everyone can see it. Let me know. Are you do you think you are totally brand new to formulas entirely? Never used them in anything? Maybe used formulas, but not in Quickbase, or are you, you know, just getting started? Are you a pro? I'd love to know sort of where everyone's comfort level is as you're joining today. And we'll just, like I said, give people a minute or two to funnel in while everyone starts responding to the poll. Alright. Okay. I'm seeing a good mix. Plenty of people who are new to formulas or new to formulas and Quickbase. Don't worry. We'll get you started. It'll probably feel a little complicated to start, but we'll definitely make sure make sure you leave feeling like you know where to get started and feel a little like you've gotten a little more formula experience under your belt and have some tools to help you. See. Plenty of people who've used formulas before were not a pro. Don't worry. We still have some content for you today as well. Ideally, I'll leave you with a few ideas or tips you might not have used before. So that'll be great for people with multiple levels. But we are doing today, we're really gonna focus on a one zero one level. So that's just thinking about what we're gonna cover today. Alright. Looks like we've got a good number of people who have joined us. So what we're gonna do is we're gonna get started. I'm gonna leave this poll open, though, so as folks come in, if you wanna respond to this poll, feel free. You can let me know what level of experience you have with formulas before, and I am going to move over to our slides. So as I mentioned, this is gonna be a formulas one zero one. The focus here is just basically to give you a great introduction to, like, what are formulas, how would you use them in Quickbase, how can you get started with formulas, and what resources do you have available that can kinda help you make the most out of the formula fields, in Quickbase in formulas in Quickbase. So like I said, our agenda is what is the formula? Kind of a little bit of an overview. We're gonna go into the terminology a little bit. Don't worry about the terminology. You need to remember it. It's just nice to have as you're reading our documents. Things will ideally sound familiar to you. Gonna talk about some common common types of formulas, reasons why people use them, and then we're going to go into a little demo. We're gonna walk through building some formulas together and in particular, looking at existing formulas and where they are in apps and kinda understanding this formula was built to do this thing. This formula was built to do something slightly different. How can I start using that myself? How can I take advantage of the things that formulas can help me do? And then I'm gonna outline a few resources you can take away with you that'll help you with building out formulas for the very first time. And then lastly, there, is it we'll have a section for the q and a time where I can take some of your questions. I will do my best just in case, any I'd have to just in case anyone throw you a really crazy formula. I might not be able to help you on today's webinar, but I can definitely take your questions. Everything for today will be recorded, so it will be available later for those of you who, need to step away. Or if you have other team members you'd like to share with. You can always find that on quickbase.com/events. You'll find all of our upcoming events and anything that we have available on demand. You'll also get an email most likely tomorrow that will have the links to the resources and the the session itself. So this will be you don't have to worry about staying here the whole time if something comes up, and you can definitely share it with others. I'd love to have more people get this information in their hands. Alright. So we're gonna start out with just a formula overview. What and that is going to be what is it what are functions and arguments, which are sort of how you think about the parts of a formula, and then what are field references and literals? Don't worry. You don't need to know any of this stuff yet. So what is a formula? You might have seen something like this in help documents before, in your own apps if you borrowed an app from the exchange and looked up a weird field and you weren't sure how it was calculating. This is what a formula, looks like. This is what a formula might appear to be in an application that might not help with answering what is a question. What is the formula? What can they do? Basically, at the end of the day, a formula is an equation that helps you calculate information inside of a field and returns a result. So it's the simple stuff you're used to from, like, if two plus two equals four all the way up to giving sort of, like, a logic or an argument that the formula is supposed to do for you. This formula, for example, if I were to describe it using plain language, I would say that, basically, double check for me if the order field or order complete field has been checked as a checkbox field. If it is checked, I want you to take my subtotal and my tax, which are two other fields that exist in Quickbase, I want you to add them together. And what that should give me in theory is, like, a total for my order. If the checkbox is not checked, though, I want you to do what it says here. It says no. I want you to do nothing. I want you to leave this field blank. And what that would basically do is you would only give me a total for my order when I'm sure when I've marked it as complete. So that way you don't have any worries about the values not being right or giving bad information to someone on a report. And And so that's basically what formula they're here to do. They're here to help deliver information to your users or yourself if you're having formulas help you calculate as a builder, help you validate data, and also help you drive workflows. So this is gonna help you avoid having someone needing to pull out a calculator so that they can start adding numbers together or having to sit down and write a process out so they can figure out where dates are. This will just help you do it easier. And that will basically help you with, the simplicity of running it. And then lastly, they can reference data within a record. So when you're thinking about your formulas, you build them so that the whole table has access to them, but they're always looking at what's happening in the record that they exist in. So if I had this example, it would only give me the subtotal and tax for that record in that field. But I could have it on all of my fields in Quickbase that field would exist in every record, but it would give you just that information there. You can't write a formula, for example, using our basic formulas that we're talking about today and say, look at all of the records in this application and add them all together for me. There are different functions that exist for that. They're definitely not the one zero one version of recovering today. And, let's see. Moving on. Where can I use the formula? So that kind of talks dovetails into what I was just talking about. You can use a formula in a formula type field. So when you're building a field just like you could put in a field that has a text text or a numeric or a checkbox, you can make a formula is called formula, and it always have a dash behind it to tell you what kind of formula it is. It's a formula numeric. That means it's going to output an a number. It's a formula text. That means there's gonna be text here. You might if you're stylizing texts and making it look pretty and giving it a bunch of special ed ed like, editing, you might instead be thinking about using your rich text field, for example. And what basically those do is those are the places where you're gonna plug your formula in, and it will do the calculations inside of that formula. And then the other place we can you can see formulas more often inside of reports, there's the opportunity to create a temporary just for that report formula, or you can base your colorization on formula. And I saw that there was a great question. Someone just asked that if I if we rename fields in a table, do all my formulas automatically update? Yes. So as long as you're using the formulas and they've been the fields and tags and they've been identified, they will update. It'll know that what you're talking about as you change things. There are ways to hard code it, so it wouldn't know how to change those things for you. But if you're doing that, you're way beyond the one zero one level anyway. Is it it's not the obvious way to do any of those things. So let's jump in. I think this is a good segue to what probably a lot of people are thinking about at the beginning of a formula because they might see some of what's, like, on the screen and think that's a lot. I don't know what it means. How do I read this formula? There are some let's talk a little bit about formula types. So formula fields are broken up into types by what the formula will display after it calculates. Those types might be things like numeric text, checkbox, rich text. So for a great example, if I wanna subtract two numbers from each other, which is sort of my earliest example, I would use the formula numeric field. What has to happen, what I have to make sure is that whatever formula I put in that field has to result in a number. If it results in a, a letter, if it instead results in a date, for example, Quickbase won't know what to do and you will get an error when you're building that formula, and that's called a type error. So when you're first building your formula, the place you wanna start is kinda asking yourself, what do I what's the outcome? What is my formula supposed to be doing for me? And you wanna think about the type of formula that you build based on that. I want to add two, I wanna add two weeks to whatever my start date field is. The end result shouldn't be another date. I want it to come out as a date so I can use it on the calendar. I can use it to, run future automations perhaps. And then, if I wanna add so that's why I can just create a second example there. I would be using a formula date field. And so that's sort of how you get started thinking about formulas. We break them down into the types that they exist in. And then once you're in one of those types, your formula is gonna be made up of functions and arguments. And your function is the thing that's helping you do whatever math or transformation you want, the formula to do. It basically gives Quickbase the information about, I want to run this type of comparison. I wanna run this type of, calculation, and then your argument is the information that the function needs to work. It basically tells the function what to do. That's very esoteric. So for my previous example where we had that formula field, in my first one, you might remember I said, if my order, complete checkbox field is checked, then show then add together the subtotal and the tax. Otherwise, show me nothing. The function would be if. It is basically setting up the logic of I want you to do something based on something else being true or something else being the way I've, explained it to you. The argument is everything after the if. It's basically giving me the if all the information it needs to run. In this instance, it's telling me what am I checking for. I'm checking for the checkbox being checked. What am I then doing? I'm adding subtotal and tax together. But if the checkbox isn't checked, which we call, like, our a null condition, it's the it's the instance where, whatever we supplied in the beginning is wrong or not true, then do this. So I often think about reading it as if this, then this, otherwise do this. And so when you're writing your set your formulas out, sometimes a great place to start is to write that down. Ask yourself, I'm gonna using an if statement. Perhaps I'm thinking if the status is equal to overdue, then I want to display the status in red, would be an example, of a formula you could do. Otherwise, I want it to be in green, and that's a really simple way to help for the formula form kinda know what it's trying to help you do. Field references are, kind of what was, Mark was talking about. The references basically say I'm looking at these fields that exist in this table with me, as references. They will pull in whatever is true for that record. So if I found this project the status is, overdue, then that that would work. If this status to product is complete, then I wouldn't worry about that. It would you'd be calculating. And those are like I said, you're gonna be looking for references typically the fields that exist on the table and the record where you're working. And then operators, you might have heard of before. In other formulas, that's the, calculations you might be doing. So, like, adding subtax and tax together. The operator is just a plus. And these are the building blocks. You may have a single formula function in a formula. You might have multiples. Your argument could be very short. It could be very long. Mostly what you're doing is you're stringing these things together to get the kind of logic that you want for your formula. And so a few quick reference examples, we had my formula that I just talked about that checks for the checkbox. We can also do things like, I have a first name and a last name field, and that's how my information comes in. I like to check those things separately. But when I'm building a report that I maybe share with the rest of the team, it'd be nice to put those two names together. You can use a very simple formula text to say, take my first name field and and my last name field. And then what this particular one is doing using little ampersands is saying and put inside those parentheses a blank space. That's one thing I didn't cover in the little breakdown at the beginning. There's also one more thing that we typically have, which is is called a literal, or you can just think of it as when I wanna insert text as is or numbers as is, I put little quotes around them. And that basically lets it know that this is something that I'm adding in to, create a space between names, or perhaps I wanna put something specific in the middle there when depending on what kind of text I'm doing. And then next, we have, kind of the reference I was making before about if I wanted to calculate a day one week from today, I can come into Quickbase and make a formula date field, and there's a function in Quickbase actually called today. And what that always does is it always tells Quickbase, tell me what today's date is. And then my formula could then add seven days to it. And so every day that I go in and check that record because I'm using today, it would always give me seven days later. And that is really great because it's dynamic. Obviously, you would think a lot about, well, that function, do I want to always know what today's date is, or do I want that to be a specific date? That's how you would kinda make those decisions about what you were doing. And then the last one here is doing a slightly different thing. So with the formula checkbox field, you can basically just make something like, hey. Is my net worth greater than this number? If it's true, the formula says true and the checkbox checks. If it's false, the formula is the formula will say untrue and it will not check the check box. And so that's a really great example of, like, on the fly calculations that could help me make quick decisions. Maybe you could build something like this that says, if a project's budget is over 500,000, then check this checkbox, and then you could build a report that looks for that checkbox being checked. Or you could build social permissions or you could build an automation that that that triggers off of that using pipelines. There's a lot of different ways you can kinda use these formula fields to change your information. And that's a great question. That's super relevant to the formula example, Stephanie. So you're asking, is there a quick reference for when to use null versus untrue? We have a great formula functions guide that I'm linked that's linked in the documents just above that goes through a lot of the breakdown of that. There's actually more than one type of null there, that is available to depending on field types. So just like the formula, what kind of formula output you expect changes what you are going to use in the formula, or the field type you wanna pick for it. Same thing can be true for what kind of data you're using, whether you wanna use null, whether you just wanna use, leaving it blank, for example, for text, for dates that are slightly different, the formula function guy will break into that, and I'll talk about that a little bit more as we dive in. Because that's one of those things that can, like, trip people up as they they feel like, oh, I know what null means. I can use it everywhere, but then there's exceptions. So that is one of those things when we're talking about error handling and how you can troubleshoot errors. That comes up a lot when we work with people before. Yeah. It's like that's a great example of, you know, Sam just dropped in a formula that uses the if function and the trim function and the two tasks function, which is doing all of those, which is doing multiple things, nested together. So, like, that's a great example of a formula that if you get from somebody else, it's really easy, but it takes a little bit longer to get familiar with the logic of it. So we'll go into some examples like that. And, actually, for that, I'm gonna jump us into an application that I have so we can kinda walk through some examples live in Quickbase, see what they look like. But I think you said that's a that's a that's a great example of how formulas can start to get more complex complex besides just a simple if this, then this. Alright. So we're gonna jump into I have my construction project management application that I've prefilled with a couple of formulas so we can walk through some examples of what formulas can be doing to help make my applications easier to use or easier to read. So we're gonna talk first a little bit about some of those calculations I mentioned, like numeric calculation. Some of those things that'd be great not to have to pull the calculator out for. So let's imagine for every one of my commercial for every one of my construction projects, I have a budget, and this field today is one that someone manually fills in on their own. They set the budget for the job and they hit save, and that is the budget for the rest of the time that the job is running unless something changes it, manually. But we set this as kind of like our this is the budget at the start of the project. Now every time I put in a excuse me. Let me pull that back up. Every time I put in a work order, that work order is going to come with a cost, an invoice cost, how much it costs me for that invoice to be complete. That is happening on a work order table, but taking advantage of the fact that I can summarize stuff up, I now have a formula I have a field here that's pulling that data up and is giving me the total running total for all my work orders. Without a formula field, I would potentially have to say, let me take this budget and let me manually subtract this myself. Instead, I can create a formula field, formula numeric because I want the outcome to be a dollar amount. And I can simply say, take my budget minus the running total for my work orders. So that anytime someone adds a new work order and it has a value attached to it, $500, a thousand dollars, $20,000, it will update this field so that at a glance, I can quickly see this is how much remaining budget I have. So if we went in, create a new work order, this is a new work order for tiles being ordered, for example, and let's say that costs $2,020,000 dollars, and I hit save. When I come back up here, run this through, we'll see that my remaining budget has gone down by the number, and this running total for quarters went up. And so what this will do is allow me to very simply continue to trigger the, the workflow. And so when we're thinking about these really simple, calculations, they can be really helpful just because they put information you have together at your fingertips without having to wait for it. So we can see here, this is kind of what's powering it behind the scenes. Remaining budget is budget minus the running total for work order. So this would be the formula that's powering that logic for us. And so you could do that as many times as you want. So anytime you're in here, you can we could get more complicated. What if we had a running total for our work orders, plus we had a, employee's costs table? So every time an employee did a job, they put in the cost of their labor. We could then add budgets minus this minus employee cost. This is a helpful thing to know when you're building formulas. This is a accurate for a field reference that Quickbase recognizes. If you see this field not identified, it's telling you that Quickbase does not know the field that you're talking about. And so the formula won't save and won't work. So, that's this but this is a simple example of just like, hey. I would like a calculation field to run math. Helpful to know. It follows all of the rules that you may or may not remember from, the order of operations for math as a kid. You might know it as, like, please excuse my dear aunt Sally or something. You might have PEMDAS, any other number of things where it will go by order of operations from math. So if you're trying to do multiple calculations, you're gonna wanna make sure you follow that those rules, when you're writing your formula because it will come out with whatever you have at the end using order of operations. Let me see. And I'm going to go back to sharing my screen. And that is a great question. It's actually super relevant, Brandon. So that's actually a good question. You're you're asking me, what happens to existing data in a formula field if one of those underlying reference fields is removed? It will break your formula for you. What will typically happen is if the formula can still calculate some kind of result, it will. It just may look crazy. Because you may, for my example, say you had the remaining budget powered by three different fields that all had numbers in them. If somebody deleted one of those fields and that field had a value of, like, a 100,000, you might suddenly be like, wait. My budget looks wild. I somehow got a $100,000 back. That number doesn't look right. That would be an example where deleting that field, there's still some kind of calculation happening. Other instances will completely break because it won't know how to run any of the math. And the next time you open that formula field up, just like when I was when I was showing this example of budgets, running totals, and adding that other field reference that was coming back with the underline red underline and the little warning message. Next thing you edit it, it will say, underline, I don't know what this field is. Like, I I can't recognize this field. And that that will kinda clue you in to, like, oh, that field's gone now. So that is and, also, another common thing that happens if people don't pay attention to what fields they're using in their calculations and start making changes. The good news is typically, if it is something like that, you can walk back and figure out what was missing. You can kinda figure out where that field went. Sometimes you have to replace it. Sometimes you have to rebuild it. Sometimes you have to restore your application, but there are ways to, like, troubleshoot those things. And so we're gonna build a little bit on this really simple example of if I want a numeric if I want to do some number calculations, I build a formula field that's numeric. I put in the two fields. I put in my operator. What if I wanted a little more logic? So what if I wanted instead to, spice up my remaining budget? I don't wanna just show the number. I wanna call attention to it by making it a color. So in here, I have just below here, I have this green color that's basically telling me there's still budget left. We can instead go in and you can make a field. Let's share this. That is using my if statement for us. And it says, if my remaining budget is greater than or equal to zero, so long as I have not gone into the negative, I want to use some handy CSS styling, which I'll explain where you can find some of that as well, to basically set a color and a high and a text color and a background color and display my remaining budget. I in this example, I'm just pulling in the formula field that already exists because I might want to use that remaining budget field in future calculations. I wanna keep it numeric because remember, whatever, outcome your formula gives you is what, that formula type is just like a field type. Is is it text? Is it numeric? Because I'm adding coloring and I'm adding styling, what this is actually going to be is rich text. It is gonna be text with something extra. So I wouldn't then be able to continue to cap may may base calculations off of this, like, do future math without having to do more work to change the data. So I may wanna keep both of these fields, but one will end up on my nice report that goes to the executive because it has a color. The other will end up not. And so in this example, like I said, I write, if my remaining budget is greater than or equal to zero, then I want it to be in I wanna show, remaining budget in green. Otherwise, that's what this little parenthesis here is saying at the very end. I want to see the color. I know because I built this formula, but, basically, I can look up and see that this would make it red. So the background would be red, so it'd be really obvious that I had gone into the red. I had gone into the negative. I was not where I wanted to be. And that is basically the the simple side of building simple side of building a formula like this. And this is a great example to walk through some of the pieces. So because if if this happens, then do this. Otherwise, do this. And you can see that every function that you've seen so far, the if, it has a parenthesis beginning and ending because it kinda lets me know that this is all inside that function. So when I'm writing this out, I would start with the if. I would set up make a set of parenthesis, and I fill it with all of the argument or the stuff that I need to do. And I'm glad you asked, John. I was going to bring up commenting, but, basically, in this editor, anything that you put in here is gonna be part of your formula. And so if you typed in random stuff, you would notice that the formula would start to break and give you error messages and it would no longer work. But it can be really helpful to leave yourself notes so you can remember what the formulas are for and how they were built. You can do that by using a double slash like this, and then you can fill it in with a note that says, I'm checking to see if the remaining budget negative. That can leave you notes behind, which can be super helpful for yourself. I have built formulas and come back a year later and had to try to remember what the formula was doing. It's really great when you're passing the formulas or the applications onto somebody else. You can basically what we do this is call it we commenting. You can comment out every step of your formula if you wanted to. I could come in and I could do this down here, and I could say this part of the formula makes it appear with a green background if it is positive. And I could then come in similarly and say this is part of the form that makes it appear in with a red background if it is negative. And that can let you especially when you're building formulas in the beginning, save yourself a note, save everybody else in your app a note. And when you save it, it's just there and available for you, and you can kind of return back to it whenever you need to reference it. So we're gonna jump back in right back where we were. So we've done a remaining budget, a remaining budget with a little nice color attached to it. Like, these are great examples that people use a ton to just give their form to give their reporting a little bit more, a little bit more information. There's a lot of other ways you can use formulas as I mentioned before. So for example, for every one of my projects that I have, let's say I'll refresh this really quick because I have most up to date data. For every one of my projects, I am keeping track of the number of tasks that that project has assigned to it. It's another table in Quickbase. I'm using a summary field to summarize that up. I'm also keeping track of the number of completed tasks, the number of tasks I've ended. And what this is used doing is it's letting me run a calculation field for percent complete. And what I'm basically saying is, similarly, I'm running a little math, and I'm using a formula function called round. And it's basically saying, I want you to round for me my number of completed tasks divided by my number of tasks. And then what's really interesting here is because round is a function that I'm telling it to round to a certain decimal point, you can actually set, the the next section. So you can say, hey. I'm rounding here number of complete tasks divided by tasks, and I wanna set the decimal place for that rounding to one to the sorry. To the, to the to the tens of decimal digit. You could also set this instead to be at the point one decimal digit. You could set this to be at the round numbers. Like, you can kind of control or edit this formula to set your rounding where you'd like it to be. This can be really helpful if you are similarly, we're running that remaining budget number, but that somehow ends up with, like, 0.75768924 leftover. You know, there, you get a long decimal places and that looks kind of gross and very distracting on your reporting because you have a ton of that, you can use a function like round to say, let's just take this down to the point one o. Let's take this down to the cents, basically. I don't wanna go lower than the cents. Or if you want then, basically, it just changes the way that you can see that information. So in this instance, I am rounding the number of complete tasks so that I divided by the number of tasks so I can get a percentage complete for my project. And so if we go back to our projects table, we can see, let's go for example for a project that is more complete, like our retail. Four out of 12 tasks are completed. I'm at 33% progress. If I wanted to change this, I could go in to my percent complete formula, and I could then, like I was saying, change this to one zero. Save it. And now when I, come back here, if I refresh just because this data's needs to be fresh. I'm now showing 30%. So I've gotten rid of the, the second decimal place. So So now it's a 30% complete instead of 33% complete. Perhaps I really like the round numbers. I don't wanna deal with things being 24% complete, 25% complete. I would just rather round down or round up, and rounding will help you do that. And then, is there basically, that is a simple and easy way to think about, like, massaging your numbers a little bit when you want them to look a specific way. And then I can go back in, add the point zero back in, and now I'm back to and come back to a form that contains my point 33. And that basically lets you know that, there's a lot of different ways that you can manipulate these formula functions, your formulas, the way things display for you, that are really flexible. And then lastly, say that that percentage field that this number is great. There this this, like, point three three complete. It it's nice. It's I appreciate it. It tells me a lot of information that's helpful for me, but, I want something nicer for my reporting, for my for my team. There's also something like these progress bars, which, are basically running on a even more complex formula. Do not worry about needing to know this formula. I'm just showing this as an example. So this is we started with small formulas, one field plus one field, one point of field minus another field. A little simple math and a rounding. This is an example of where formulas can continue to go to, keep growing. And so you can see here, I've got all kinds of styling that is set to, run on my percentages. The great news is you do not have to pull this kind of formula out of your right out of your head. You can actually find formulas like this available in our Quickbase Exchange. So this is this formula I specifically pulled from the Exchange as an example for all of you. You go into the Exchange in any in your Quickbase, instance. You can filter down to just formulas, and you can find a bunch of options for you. This progress bar, for example, came right from this progress bar builder. When you do, you can either copy the formula and put it some place yourself, or you can use the installer to pick the table that you wanted to go into. So I can do my complete contract manager. I can go into my companies, wherever it might be as long all I need to have is whatever field it needs down here. And so this one needs a percentage complete field. So I would have to have built that percentage complete field that was calculating for me. But, otherwise, it will do all the the work of making that formula look really pretty, really easy to use, or really easy to understand for your team. And so you start out from that longer progress but you start from that whole formula and instead get yourself down to just this progress bar. And so when I look at my projects table, imagine if instead of this progress bar, it was that 33% in just the plain text. Probably not as dynamic, probably not as attention catching, but I can instead get a really good good idea that, like, oh, the end date for this project, this example is very old. But imagine if the end date for this project was, like, a week from now and I was only at 17% progress, that would probably click for me really fast. So, like, there's a disconnect here. I wanna make sure this project gets done in time, but it seems like a lot of the tasks underneath it are are aren't done yet. Or even simple things like, if I mark a project complete and this is only at 50%, it's immediately gonna make me wonder, why aren't all the tasks beneath it completed? Someone forget to, close tasks? Did tasks truly not get done and I'm telling people the wrong thing? That is what it, if that is basically what it's controlling for you. Yeah. And so that basically is gonna help you to get an idea of, like, using formulas to make your make your reports reports more personable. You're not just giving people a percentage data anymore. You're also giving it a personality, drawing their attention to it, helping focus things. You can even do it with, for example, some of you might have already used file attachment fields where you can bring in files and you'll get this nice quick preview, but you cannot you won't actually see this preview if you put it on a report. Instead on the report, you'll see that there's a file attached there because we can only consent finish so much information. You can also use a formula like this to basically say if that project photo and this goes into that question we had earlier about how do you let it know if it's null. This is saying is not equal to. This is another one of those, really classic functions that we use. The greater than, less than sign together says is not equal to, specifically blank because a file attachment field is either blank or not. Either there's something in or there's not something in it. If if it is, not equal to blank, which means I have a file attachment in there, I want you to style that that for me. And you can basically go in here and just just take the height, the width, the size, everything like that really easily. And then there's a port here that basically says once I got all the styling, you can find that record by using this here. And what this basically is saying is the source is my realm, my app, and use the record ID to match it up correctly to the right field and and place. Don't worry. Again, this is another one of the formulas that is in the exchange. So the first time you do this, you can have the exchange help you do it, and you can start to learn and pick apart the pieces. Like, when it comes to starting with formulas, I heavily recommend find some formulas that work. Find them on the exchange. Find them in our community. Find them in the pre bill apps. And think about how to learn how to change just the two or three pieces you need. For example, imagine I was copying this over to, another I wanted a second one of these for some reason with the so I could style things differently. I may wanna just come in here, copy this field entirely, and I might wanna change the height. And I'm gonna make it, 50 instead of a 150. I wanna make the width, 25, and that's gonna be the the the version I show on a a different report. I wanna report with smaller images because I don't want the images to take up as much space. Like, this is great for the project managers because they get a little bit of a personality for it, but I want something much smaller for someone who's on-site and maybe is looking on this on a tablet or something, and I want those images to just not take up as much real estate. So heavily recommend when it comes to formulas, a little bit of plagiarism is okay. You can definitely copy and paste from others, and use that to help you build fresh formulas. And so we've gone a little bit over, how do I start building a formula, something like remaining budget? How do I start colorizing? How do I start, doing some more complex math? How do I think about doing things like unlocking a progress bar or taking advantage of some of the really interesting stuff that you can do with our more complex formulas? And then, you know, another thing is formulas can help you with, as I mentioned before with this for with displaying this photo, you are you can basically take control of and use formula URL fields to build all those buttons that you use inside of an app. So this one would let you for example, it says field styles form view sales rep form. Similarly, you can see that there's ones down here that say add work orders, add tasks. If you've ever downloaded an app or added a relationships that you have related fields, you almost always get these add work order, add tasks built automatically for you by Quickbase. Those are actually also on the back end just powered by a formula. This isn't just instead a formula URL field. And we talked a little bit already about, the arguments and the functions in a formula. So these functions here are actually calling out important parts of this app for you. And so what this is doing is it is essentially recreating this part of a so this would be the URL that exists for my test account. It is saying, look, for the URL root, which is evanstestaccount.quickbase.com, It ignores this navigation stuff because that's something that we added for the navigation, but then it says add in DB, which is this exact section of part of the formula to basically say this this database and grab Evan, the database that links the the, DVID or the identification for the database for this table, and that would be this part right here. And then we show me the table or sorry. The app is this. The table is this is what that's what I was forgetting. The at first table second. And then go into the action, which is to, add a record. So, basically, this part would be then saying action. API gen ad record form is the form that you see anytime you hit add a new record to a table. Specifically, I want form number 10. And then at the end, I want a URL encode, which I mean I wanna pass along some information to the table I lined up in, the record ID. I wanna take the record ID of this project. I wanna then grab that, hold it in my hand, go over to the work orders table, start making a new work order, and immediately plug the record ID into a field. And most often, you plug that into your your record ID fields. So, like, here it says f I d 10, field 10, which would be, like, my related projects table. And that's how we create buttons that let you add related records automatically, but you can also steal this logic to help you add records in other places. And, you can so you can do that. This basically does it once. It says, and f I d field 10 equals record ID. I could go in myself, steal part of this, and say, I want to edit this edit this, formula together with everybody, and I wanna add something else in. So this part is a literal. It is actual text I wanna copy over word for word. I want our for character for character. I want to say n f I d 10. But what if I instead knew that the date field for this is a specific field. I wanna say it's it's field 18 would be, like, the date, started. I can go in and then say this equals and URL encode. And I can actually go in down here in my fields and functions, select a function, and I could look for something like date functions. And we could find today. Drop it in my app. And now it's saying and set f I d 18 to today. And working right here in the editor together, you can see I'm getting an error message that's saying these are extra characters beyond the end of the formula. If you edit formulas for very long and Quickbase, you will absolutely get this error message. It's letting me know that the formula always runs top to bottom until it run until it thinks it's done. And it's saying, hey. As far as I know, this is one whole complete formula. I'm done working. I don't have anything else to do. You would wanna make sure that you then connect those pieces together. The classic way is with an ampersand, It's trial and error here with learning, like, how you connect things together. But, typically, either if you're seeing that message, it means there's a part of your formula that you don't need anymore that's left over, or there's a part of your formula that you just need to string together so that it learns at the end of the day if we wanted to break this one down as an example. This says, get me Evan realm and then get me the information for his table. Once you have that information, I want you to stick in the request to add a new, add a new record and fill in, field 10 with the record ID number and go to field 18 and fill in today's date. And this is a, after you add this return back to the table that we're currently on. So you would imagine you're using this button. You hit add from add project. You'd just click select add work order. You'd open up a new form on work order. You'd see that immediately it already knows the parent record it's related to you and it already fills that date started field with today's date, then all you have to do is go fill out the rest. And so this you can keep going. You could build these so that they fill in some comp some stat some information for you. Great examples I've seen have been if you have a couple of standard tasks that you run. Things like, oh, my task might be email outreach to a customer. I might have it fill out, oh, the task type is email outreach. The date that outreach is today. So that when my team is doing work, every time they hit that button, it is prepopulating as much information for them as possible so that they spend a lot less time, basically doing manual data entry for me. And so those are great examples of some classic ways to think about using the click based formulas to just simplify your workflows, thinking about ways to add fields, add progress bars, add other things. And you can as you can imagine, this is just a very small, sample of the kinds of things that people can and have done with formulas. They go from very simple to very complex. For those of you getting started, like I said, I highly recommend the Exchange is a great place to find some really awesome already prebuilt formula fields for you. We also have a couple of other great things. I recommended I launched I set them up in the docs in the upper right hand corner. I'll I'll cover them in a little bit. But before I finish, I just wanna plug, like, it can feel daunting, but it is not as hard as you think it is to add a new formula. And the easy way to get started anytime you are building is just by thinking about adding a new formula field. Then from the formula field, you do the writing. Once you're there, like I said, you I would typically sit down best practices. Explain to yourself in plain English what you want a formula to do. If this, then that. If this, then that. Or all otherwise, if it's like a calculation, you don't even need the if. The if is just the one of the most common things that people want because they usually want some kind of, like, one versus the other. And there's a ton of different functions out there for weekdays, for doing math with dates, doing math with numbers, for changing data. So, for example, trimming it was basically saying if there's any meeting or trailing, spaces, if there's any spaces I can't see in here, just trim them down, take them away because I wanna customize. That is things that you can do. And I'm trying to think if there's anything else specific I want to cover in this part that's live before I move on to questions. And I think no. I think this is a good stopping spot for us today. Hopefully, that's just great. This was just a good taster of what people use formulas for, what types of formulas are, and how you would think about interacting with them. There's one last thing I wanna cover. The thing you're gonna use the most often is this formula builder here with you. You can do things like have it check your formula where it will actually do some help you do some work figuring out if your formula is working. And when you're editing, as I mentioned before, you can find all of your field tags for a particular table listed down here. And if you grab one of them, it immediately gets added in. And it lets you know, for example, here, it's not compatible with my field type. What that means is this is a date field. This is a numeric field. They are not friends. You can't have a date in a numeric unless you turn it into a numeric. And then functions is a quick way to grab all the different kinds of maps. In here, you get a little explanation. You get the and it basically breaks you down for you. So left is a, returns the leftmost character from a text argument. So, for example, left of a, b, c, d. I say I want the left two numbers, I get a b. And so this is your kind of your resource for you that's built in. We also have a formula functions and stuff like that that you can basically reference. Let's get back to because I've seen there's a lot of questions over the course of this. I'm gonna make a quick plug for formula writing resources. There is QuickBase help full of tons of resources that I have linked in the docs above. QuickBase University has a course that's on formulas, and formulas is in a number of the courses as well as, like, a part of it. We have our formula functions app. Similar to the little built in functions drop down that you can see when you're writing a formula, there's a whole QuickBase app that we have available to the public that is full of all of our formula functions and a lot of explanations and examples of how to use them. Everything's there. Even people who work QuickBase use it to this day to help them double check, like, am I forgetting something? Is there something that I need? And then lastly, the automatic formula machine is a really great resource made by one of our internal team members, Brian Caparelli, and maintained by him for years that will also help you build formulas. You can go in and say, I wanna colorize a status field, for example, so that the statuses appear in specific colors, color coded to help me know what work is happening. And you can go in and put the values in using a QuickBase app and basically build out your formula for you, and it'll give you the formula for you to copy and paste in. I cannot plug it enough as a great place to also find, like, the exchange the formula to get started with. Alright. So that's my plug for a lot of the things. Let's move on to q and a because I've seen a ton of questions, and I wanna make sure I give folks some times for their specifics. So I'm gonna roll through what is in the chat really quick to see if there's anything important that I've missed. Let's see. There's some formula some questions around performance. That is a great question. So just like any other piece of data, formulas do, absorb a little bit of the calculations in your application. If you have a couple formula fields up to a decent number of formula fields, it's not that bad. But the more calculations you're asking Quickbase to do, the more performance that is happening. So if you're thinking about big datasets or big things that you're writing, if you're querying a lot of stuff at once, you could think about like, oh, I wanna make sure I keep my performance lean. There's a couple of best practices when you're writing a formula that is very similar to when you are, calculating record or you are building reports or when you're building other kind of queries in Quickbase. Write your formulas that always makes the, it always simplifies your dataset as much as possible. So you're gonna try to write things in order so that it does it basically cuts your calculations down quickly. Great example might be if I only care about running a calculation if a field is if a form is if a record status is complete, I would put that first in my formula and say check if the record status is complete because that's a typically a small low calculation field that it will quickly say, okay. I'm gonna ignore all of the ones that don't have complete. I'm done. The math is done. I I always do it a little bit. It's it's think of formulas as being very lazy. They will only run until they get an answer. They won't then be like, is this the right answer? They'll just be like, this is the answer for this part of the formula. It'll skip anything below it. So always think about going from very specific logic to more generic logic if you're trying to narrow it down really fast. So if you're saying that, like, if these three things are true, I want this status to appear. That goes first. And then you say, well, if these only these two other things are true, you can kind of narrow it down. But they will they do have how they do impact performance, but usually when you get start either getting to the scale of you're calculating off a lot of things or you're calculating a lot of things at once. Great question on for Mario on do reference fields have to be visible in a form to work in formulas? No. In formulas, don't have formula fields that you're calculating off of reference fields that calculated off of. None of them need to be on the form for someone for you to be able to use them. They are basically looking in the back end of Quickbase. So a great example would be I had all those fields out for you to see them. I could remove all of the fields but the pretty ones, the ones that I actually wanna display, that remaining budget that was colorized, the progress bar that was colorized. I could hide everything else, and no one would ever know, but they'd still get all the great calculations. Let's see what else do we have here. So, Leland, you're talking about I I'm having you, uses with creating a formula to only allow times to be entered in a form within a specific range. Example, only a lot of times from 8AM to 9PM. This is a great example of a formula actually where, what you do is you could build a formula checkbox field or you could build basically a formula field that somehow lets you know in a really predictable way. Like, you could have it display in text a yes or no, and you could say, I have this, time period field that basically lets people know, like, you know, say, like, time started. I can only and time started can only be between 8AM and 9PM. You could write an if formula that says if time started is not between 8AM and 9PM, then check this checkbox. And then you can set up rules that basically say, like, a form rule that could say, hey. If that checkbox isn't checked, don't allow me to save the record. I didn't cover form rules today. Another piece of the puzzle. But you can basically use that to help you run permissions. You can use it to help you run form rules. Formulas are kind of available and visible. So there's a lot of tricks you can use to say, hey. If I'm going to save a record and what I've done is made it so that the budget's in the negative, prevent them from saving the record and be like, you can't give me a negative budget, for example. So they too can work together. The two works together. I did see another question that came in about where can I get the formula function app? There's a drop down for documents just above the chat. I've linked a bunch of that stuff there. Also, if you just Google Quickbase formula functions, that's, like, the first thing that comes up. So it's really easy to get to. Common blocks are indeed supported. They are just that double slash. The trickiest thing might be is make sure your slashes are outside of any sets of quotation marks you've made. It might not recognize that you're quoting that out if it's typed quotation marks because the quotation marks are saying, take this text as tech. Like, take this text as plain text and do exactly what it's saying. It basically said ignore any functions inside of it. How do we how many nests if formulas can you include? That's a great question. It's a tricky question. So you can keep nesting ifs, and you could say if this very, generic thing, if this very specific thing, you can go down, down, down, down, down. I've seen some long ones. That goes back to the question about performance. The more ifs you nest, the more complex the calculations are, the higher chance that you might run into some error messages, the higher chance and not not pretty sure how to use them, higher chance you're not gonna be able to understand the formulator, higher chance that it's going to be chewing up a lot of performance. So I usually just encourage people to think about, like, does it should that be one formula? Should that be multiple formulas? What is kind of, like, the way you think about breaking down your formula? But if you have five, six if, that's really not uncommon. You can also typically, if you need them, there's another function called case that I recommend for folks. When you're thinking about, like, hey. The case is status complete, do this. Status in progress, do this. Status in, canceled, do this. Case actually helps you run sort of, like, for a set of results. Here are the outcomes. You would just always think of cases being, like, for this field, that this field specific value is one of these five things. Here's a list of five other, like, outcomes. If is just a great starting point, usually, if statements are, pretty pretty helpful. Yeah. The the the hard limit, like Sam is saying, is 500. I I encourage people, like, if you're at 500, it is important times to think about, like, how are you scaling and is or is this the best way to scale that much information? Or is there things you could be doing with app relationships or with related tables that would help you narrow your data and decision making before you get that deep in it? Let's see. So we've got some stuff already answered in here. It looks like can we have a user formula to dynamically populate a drop down with the contents of one table or another? I have several formula checkboxes on a ticketing application that uses drop downs and recently expanded the categories. I'm using rules to dynamically display the proper drop down based on the values in the checkbox if it'll limit the number of rules I can create. Yeah. So that's a little bit that's a that's a complex. I'm gonna call that one out as a I can't give you all the guidance on this one because I have to sit down and think it out myself. So no. Typically, the way you think about a formula is a formula is changing what's in it, what is inside of that formula field that's not changing the, information on any for any other field. So you can't have say, hey, formula field. Go out and change something else. What you can do is, typically, if you wanna dynamically control what shows up in a drop down, you use relationships. You build a table that is the parent that has all of your options, and then you relate it down so that people pick from that drop down of related records. And it might be like, I I wanna I'm picking a location, for example. And then you use permissions, which could include formulas to say only show these records under these situations. So if a user is a salesperson, only show them my sales locations in Phoenix, Tempe, Tempe, and, Lawson, for example. If they're a manager, they can see all of my locations. If they're an admin, they can see all of my locations. But that is a way that you can use permissions instead of formulas, but great question. And then yes. Let's see. Yes. And I didn't cover it today, but it will definitely be being covered in future. One is that there is something called formula variables. I have plans to cover that as we go further into formulas. Today was just really a a big intro to the whole concept. Formula variables are really helpful, though. There's something that you can use to simplify your formulas down a little bit, especially if you're gonna be repeating yourself. A variable basically says, if I say this smaller thing, do this larger, set of calculations for me, and you can repeat it over and over again. Let's see. I have the built in. Okay. And let's see what else do we have here. I have three sets of start and end dates and need to count the number of days between each to calculate, count occupancy, my any my month, any recommendations. Yeah. So, in that formula functions guide, you're gonna wanna look up the stuff that's related to dates. And there are some functions that will let you basically, double keep that you can use to put two dates inside and say, compare these two dates and tell me how many days are between them. So you would use that formula function. And what you might end up with is, for example, you could have a formula for each of those sets of start and end dates that help you count. So, like, for this set, it's five days. For this set, it's ten days. For this set, it's eight days. And that's a good example where you'd write that formula once, kinda copy and paste it over, and all you'd have to change is the references to the dates. Alternatively, you could and then you could make another field that adds them all together, or you could do the bigger task of doing all of those calculations, adding them together all at once. You would just basically, your your formula either gets more or less complex depending on how you wanna break down. Do you wanna do bits of math at a time? Do you wanna do all the math at once? Alright. So I'm seeing the rat too. I know we definitely still have some questions, but I'm gonna say we'll wrap it up there. Thank you for joining us for this quick intro to, like, one zero one. What can formulas do for you? How can they help you start to think about Quickbase? How can you get started thinking about them? As I mentioned, please definitely make sure you think about the references we have avail the resources we have available for our help for those formula builder machines for the exchange. They are great starting points. Also, feel free to let us know if you have any questions, afterwards. Like, I definitely am happy to chat with some folks, especially also use the community, quickbase.com/community. It's a great place. There's tons of awesome people who know a ton about formulas there that you can share. I am there sometimes, not always, but when I have time, I jump in and also answer questions. Otherwise, thank you so much, and have a great rest of your day.