ContributionsMost RecentMost LikesSolutionsRe: Text Formula Field - Pull text from another field This is the first thing I can help with, because my firm did the same thing! We had a V1 of it that was simpler, but this ended up being more robust, and I'm not sure how to create it. First, you need to create a rank based off of some criterion. We used this formula numeric field (names changed to be more like yours): var text query = "{8.EX.'" & [Patient Name] & "'}AND{10.LTE.'" & [As of Date] & "}"; Size(GetRecords($query)) This gets you the count of records by that patient with the as of date being less than or equal to the as of date of this records. So, if this is the 10th visit, the rank will be 10. If you go to the last time they were year, the Less than or Equal Date to won't pick up the most recent visit and then be 9. You then can create a "prior rank" field which is just equal to [rank] - 1. You could also re-define this in this next field, but if you're going to use it to pull multiple fields in, this makes more sense. You then can create a query like this: ToText(GetFieldValues(GetRecords("{8.EX.'"&[Patient Name]&"'}AND{15.EX.'"&[Prior Rank]&"'}"), 20) (in this example, 8 is the patient name field ID, 15 is the rank field ID, and 20 is the "why are you here today" field) You pretty much query your own table for the same patient, previous rank. I'm not sure how formula or query familiar you are, so I hope that helped! but let me know if you have questions ------------------------------ Thomas Otten ------------------------------ Go to report with custom filters Formula URL or Report Link Hey Qrew, I have a question that feels like it would be really easy but the lack of documentation around formula URLs is complicating it. I want a button in a form in table A, that takes me to a custom report (report 11) in table B, only showing records where FID 83 in table B is equal to [Related Deal ID] in table A. I have this formula URL: URLRoot() & "db/" & [_DBID_PROPERTY_METRICS] & "?a=q&qid=11 Which takes me to the right report, but no filter on it. I edited it with this information: URLRoot() & "db/" & [_DBID_PROPERTY_METRICS] & "?a=q&qid=11&_fid_83=" & [Related Deal ID] But it just gets me to the same report, no filter. I'm not sure how to feed the following query into the URL either: "{83.EX.'" & [Related Deal ID] & "'}" All the prior discussions seem to circle back to "use a report link", but, while the report link does lead to the right table, with the right filtering, I can't figure out how to get the right report displayed. I would have to edit the default columns to show the columns I want to see, which I don't want to do. I could do the "show records in form" option in the form rules, then have the users click on "full report", but I want it to just be a button. So does anyone know any of the following: - 1: how to feed filters into a URL to a specific report - 2: how to edit a report link field to link to a specific report - 3: where I might find documentation around what parameters I can feed into a URL to manipulate it? All the QB help articles are frustratingly introductory. ------------------------------ Thomas Otten ------------------------------ Formula URL to return if statement results? Hi y'all, So I'm deep in the weeds of creating a relatively complicated button via a formula URL, one that has a bunch of nested if statements. It's currently not working. However, rather than ask for help in debugging this one if statement - which might be helpful, but I'm sure I'd just run into a similar issue with a future button - I'd love a chunk of code that lets me feed an if statement as a $variable in, and pressing the button returns the results of that if statement (in a new tab, or a pop up window, or even writes it to a field, I don't mind as long as I can see the results). For reference, my current URL formula is similar to this: So there's 5 if statements. I'm getting an error with like result 3 not coming out how I want to, so I want to backtrack and see how condition1, condition 3, and condition 4 are outputing. For reference, the nested if is put into the variable "nestedIF" and piped to the button below: URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Record ID#] & "&apptoken=[TOKEN]" & $nestedIF & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()) ------------------------------ Thomas Otten ------------------------------ Re: Really Dumb Question - Button to Create Record? Wow! Tossed my app token at the end of the Var Text line and it worked like a charm! Thanks so much Mark! ------------------------------ Thomas Otten ------------------------------ Re: Really Dumb Question - Button to Create Record? Ideally, to the view page of the record that was just created. If that's tough to do dynamically, probably just the app dashboard. Or I could maybe a page ID to the table the record and send it there. ------------------------------ Thomas Otten ------------------------------ Really Dumb Question - Button to Create Record? Hey Y'all. Long story short, I want a button that does the same thing as hitting save & close - it creates the record if there isn't one, and then lets you see the record in edit mode. I can't find a button in magic buttons that does this. Ideally, I'd then build out the functionality to set the field ID 40 = 1, but that is substantially easier than trying to figure out how to build a button that exists already in QB into the edit version of a doc. This is so an employee can just click "save and submit for approval". It's more work than it needs to be to save one click, but I'm surprised I can't find documentation for this ask. ------------------------------ Thomas Otten ------------------------------ Re: Button to Update field AND save and view record? Between your advice, some help from the Magic Buttons app, and trial and error, I got it working! Thanks so much! ------------------------------ Thomas Otten ------------------------------ Re: Button to Update field AND save and view record? Between your advice, some help from the Magic Buttons app, and trial and error, I got it working! Thanks so much! ------------------------------ Thomas Otten ------------------------------ Button to Update field AND save and view record? Hey Y'all! So, I have a form, and I want a button that is "submit for approval", in a form. When it's clicked, I want it to 1: select the "submit for approval" field and 2: save the form and display the newly created record in view mode. I got part one down with this URL Field code (from magic buttons): If([Submit For Approval] = false, URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Record ID#] & "&apptoken=xxxxxxxxxxx" & "&_fid_40=1" & //this is the checkbox field "&saverecord=true" & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]), URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Record ID#] & "&apptoken=xxxxxxxxxx" & "&_fid_40=0" & //this is the checkbox field "&saverecord=true" & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])) However, clicking the button brings up this error screen: However however, the record is still submitted and is viewable in the app. So, I kind of think the code is trying to reference the Record ID before it's created? Anyway, anybody know how to make this work? I've looked in these forums, asked ChatGPT a bunch of times, and spent time scrolling through Magic Buttons, and no dice. ------------------------------ Thomas Otten ------------------------------ Re: Power Automate to Quickbase Connection? Thank you for the advice! Maybe we'll have to convert to CSV. Still learning JSON/API so that's a bit above my understanding as well at the moment. Thomas ------------------------------ Thomas Otten ------------------------------