ContributionsMost RecentMost LikesSolutionsFormula URL Line Break Not WorkingGood afternoon, Below is an excerpt of the code causing trouble: var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & "&apptoken=xxxxxxxxxxxxxxxxxxx" & "&_fid_11=" & URLEncode("Submitted to Department Head") & "&_fid_20=" & Today() & "&_fid_48=" & [PR Log] & URLEncode("\n") & ToFormattedText(Today(), "mm/dd/yyyy") & ": " & UserToName(User()) & URLEncode(" submitted PR to Department Head."); The intent of this code is to append text to a log field, describing actions taken on a record. Such as that the multi-line text field record log field might look like this after several rounds of different users taking action on a record. 09/01/19: John Doe submitted PR to Department Head. 09/02/19: Tom Brown rejected PR. 09/02/19: John Doe submitted PR to Department Head. 09/03/19: Tom Brown approved PR. 09/04/19: Jim Johnson approved PR. The SPECIFIC problem is the URLEncode'd line break (line 5). If I remove that portion, the button works as intended. When the line break is in place, the button does nothing on the form. The field is a Text Multi-Line field. Am I doing something wrong? Thanks, Jason ------------------------------ Jason Bowen ------------------------------ Re: Add multiple child records to a parent record with Formula URL button and JavascriptTom, Thanks for this detailed explanation. I'm not an expert in JS, but I learn easily by reverse-engineering the code of others to understand what they did and why they did it, syntax, etc. I'm going to try this method, and the method Mark posted and see what each one looks like. Thanks! ------------------------------ Jason Bowen ------------------------------ Re: Add multiple child records to a parent record with Formula URL button and JavascriptThanks for the tip Mark. I'm going to give it a shot and see how efficient I can make the form usage for the end user. ------------------------------ Jason Bowen ------------------------------ Re: Add multiple child records to a parent record with Formula URL button and JavascriptThanks for the tip on the "Save Parent Record..." option in the advanced settings, that solved that piece of the puzzle. It looks like I'm going to have to handle this outside QuickBase. There are too many variables to account for, and the solutions I've thought of so far are too cumbersome to force managers to use. Jason ------------------------------ Jason Bowen ------------------------------ Add multiple child records to a parent record with Formula URL button and JavascriptHi, I am creating a PTO (paid time off) tracking application in which a PTO period (which can consist of several days) must also be accounted for by hours of PTO taken per day. I have a parent table for PTO block (paid time off), consisting of a relationship to the employee, a Start Date, and an End Date. I have a child table for PTO days (individual days within the block), with each record consisting of a relationship to the PTO block, a Date (to capture each individual day), and a number of hours per day of PTO used. I am looking for help with formulating a URL button on a parent record (on the Add Record form, prior to saving) to accomplish the following: Save the record while avoiding the pop-up "you must save record first" dialog (if this is possible) Create the appropriate number of child records for each day of the duration of the PTO block (End Date - Start Date + 1) Don't even get me started on why "End Date - Start Date + 1" isn't a valid formula to Quickbase. Dates are numbers too. MS Excel figured that out a long time ago. Pre-populate each child record with a date, representing each day within the block of PTO time There is an "Add New PTO" button on the Employee Details form, which brings up a new window to enter the Start Date and End Date. I'd like to also have the individual child record PTO days available on this new window in a Grid Edit embedded table so that it is easy for the supervisor to enter the number of hours of PTO associated with each day of the PTO block (it's not always the same number). Is this possible? And if so, can someone point me in the right direction to figure out how to go about this? Thanks! ------------------------------ Jason Bowen ------------------------------ Re: Trouble using QuickBase Automation to update a record Disregard, I found a related post in which a reply posed the existential question, "why does it have to be that way?" Upon further review, there's really no valid reason that I can't pad the record ID and use that. ------------------------------ Jason Bowen ------------------------------ Trouble using QuickBase Automation to update a recordHello, I am having trouble with a Procurement Request (PR) management application generating its own PR numbers, which must be unique, and in a sequential order. I am working on a Procurement Request (PRs) management application. The application has users assigned as Authorized Procurement Representatives (APRs), Department Heads (DHs), and Procurement Managers. APRs and DHs have restrictions on which department(s) they may create and/or approve procurements for, based on relationships between Departments and APRs or DHs. When a PR is initially created, it is not yet assigned a PR number. When the PR is created, it receives a [Status] of "Pending Submission". This is the equivalent of a draft. Only the user that created the PR can see it at this point. When the user is ready to actually submit the PR through the procurement process for the first time, they will click a button [formula URL] that: Enters the date of today() into a field [Initial Submission Date] Changes the value of [Status] to "Submitted to Department Head" Assigns the next sequential PR number (i.e. 2019-0001, 2019-0002) to a text field [PR Number] The problem is that I'm getting duplicate PR numbers when multiple APR users (which have different restrictions on which departments they have visibility on) are creating and submitting purchase requests at different times. What I need to happen is: WHEN a PR is being submitted for the first time, it is assigned the next sequential number for PRs for the year (fiscal year). Only PRs that have been submitted apply toward this count ("Pending Submission" PRs do not count). Because "Pending Submission" PRs don't count, the PR #can't be applied at the time the record is initially created. PR numbers would be "yyyy - ####". Once October 1st comes around, PRs will be numbered "2020 - 0001", etc. Suggestions? Thanks, Jason ------------------------------ Jason Bowen ------------------------------ Re: Totaling a field with matching criteria from an UNRELATED tableI actually tried a similar method, but for an unknown reason, it didn't work. I created a formula field in the OT table, concatenating date serial and employee id. The field isn't unique because it is possible for an employee to have more than one OT entry on a given day (there are reasons). I created a similar field in the OT Projection table, also not unique for same reasons. I then created a summary field in the OT table, which would attempt to total the duration of all OT Projection records in which the two formula fields matched. It didn't work. I suppose because the only way I could use a summary field was to create a relationship between OT and Projections, and they aren't really related directly to each other.Totaling a field with matching criteria from an UNRELATED tableBackground: An [EMPLOYEE] can have many [OVERTIME] records (which are added by a supervisor after the overtime has been accrued). An [EMPLOYEE] can have many [OT PROJECTION] records (which are projections of potential overtime added by the supervisor the week prior). It is possible to have multiple overtime records assigned to a particular employee and date. It is possible to have multiple overtime projection records assigned to a particular employee and date. Typically, our client wants us to provide a projection of all employee potential overtime for the upcoming week ahead of time. Therefore, the supervisor will create many overtime projection records. The actual overtime records can't be created until the overtime is actually accrued, because only then would the supervisor know what to enter. I need a way for [OVERTIME] records to display the correllating SUM of [OT PROJECTION] hours for that particular employee and date (so we can easily determine if an employee's actual overtime exceeded the amount of overtime that was projected earlier). I can't seem to find a way to do this easily. Relationships between the [OVERTIME] and [OT PROJECTION] tables doesn't seem to work because there is no set order in which the records will be created. It's possible to have overtime records entered prior to any related overtime projection records created as well. TARGET A supervisor can pull up the report of all overtime for a particular week. He'll see that employee "x" accrued overtime on various dates, and can also see the total amount of projected overtime on that date for that employee as well.Re: Field-level visibility control per record in reportsPerfect. Thanks!