ContributionsMost RecentMost LikesSolutionsRe: Native/Alternative Solution for JavaScriptThanks Mark! SearchAndReplace is indeed new since I put this JavaScript in place. I tried using it in a Formula-Text field and it wasn't working, but then I tried using a Formula-Rich Text field instead and that does work, which makes sense now that I think about it. Anyway, I think the Formula-Rich Text field is also relatively new so with both now it looks like I can get rid of this particular JavaScript. I still have a couple other (more DOM related needs) that I'll post separately. But this one was more of a priority so I'm very happy to find an alternative. You are the man! ------------------------------ David Hoover ------------------------------ Native/Alternative Solution for JavaScript In regard to the recent announcement about upcoming changes to JavaScript I have been looking into alternatives. I use JavaScript to solve 4 different problems where I couldn't find a solution elsewhere at the time. It's been several years since these were implemented but hopefully things have evolved or changed so that now I can replace them with something native, or with something that will be supported in the future. To keep my first post on this as short as possible I'll just start with 1 of my uses. The first JavaScript I implemented was put in place to remove carriage returns from a Notes field contained on our employee Timesheet entry form. The Timesheets are exported weekly and that export file is used to import to our accountants. If that file has a carriage return in the Notes field it would not import successfully into the accountants system. Before implementing the JavaScript for this our internal admin was manually scrubbing the Notes field before importing to the accountants system. I helped make that process a little easier with some tricks to remove them automatically in Excel but it was still extra steps that were not welcome. So the final solution I came up with was to use JavaScript and regex to remove any carriage returns with the OnBlur event handler. My JavaScript is within a Code Page but I use a Formula Rich Text to have it accessible on the Form Here's the code in my "timesheets.js" Code Page I use for this (#_fid_8 is the Notes field on the form): $('#_fid_8').blur(function(){$('#_fid_8').val($('#_fid_8').val().replace(/\n{1,}/gm,' '))}); And here's the Formula used in the Rich Text field placed on the Timesheet Form: [script_page] & "timesheets.js" & [/script_page] This field was identified as one that would no longer be supported when the upcoming changes are implemented. According to the posts it should still function but I won't be able to make any changes to the formula field, it will be locked down (though since the actual JavaScript is in a Code Page I assume I'd still be able to edit it if needed). So I guess first I should ask if that is truly the case. Will the way I have implemented JavaScript for this issue be unsupported when the changes are put in place? If so, can anyone think of an alternative? Is there is something native within Quickbase I am overlooking? Several years ago when I put this in place I couldn't find a formula to find/replace a carriage return (just text and/or numbers, etc) or any other native method, but I haven't delved too deeply into recent enhancements like Pipelines, or trying to solve this with Automations which also was enhanced or changed since I implemented this solution - but would either of those tools or anything new be a viable replacement somehow now? ------------------------------ David Hoover ------------------------------ SolvedRe: Drop down menu to show only related project contactsThanks Mark! I did actually look at that but I can't seem to find the appropriate fields to select.. I assume it should be the ID (key) in project table, should match the Related Project (ID) in contacts table. I'm not sure why it's not selectable on the conditional options. Playing around I was able to use a different field (project description which is a lookup on the contact table that comes from the project table) but when that field is set to read-only on the closeout form (they shouldn't edit it from there) the contact drop down is disabled and says to first select the project description. If I make the description field editable on the closeout form then the drop down menu then populates with the right list. As a workaround I just used a dynamic rule to make it read only and that works. But what ID or field should I really be selecting. Record ID# (from the Project table) is not listed in the choices in the first condition. I would think I want it to match the "Related Project" in the Contacts table. Anyway, still confused but I think I at least have a workaround using a different field. But let me know if you have any ideas or insight. Thanks again! :) ------------------------------ David Hoover ------------------------------ Drop down menu to show only related project contactsTo simplify my app I have a Projects and Contacts table where each project can have multiple contacts. I have a specific form in the Project table called Closeout. The form is a series of questions someone from my company fills out while talking to the Contact. One of questions is to select the specific contact they talked to from a drop down list. When a Contact is created the are assigned to a specific Project. What I am looking to do is have a drop down menu on the closeout form that lists only the project related contacts and not all contacts in the table. I made a reverse table relationship (one contact may have multiple projects) and then used the Related Contact (reference) field to display the drop down list on the form. I used the default record picker and also made an embedded table report but in both cases the drop down list shows all Contacts in the table, and not just the ones that are specifically related to the project. How do I make the drop down menu only show the contacts that are specifically related to the project? What am I missing? ------------------------------ David Hoover ------------------------------ Re: How to create a total of weekly allocated hours per employeeOkay, I see where you are going with this. I'm not sure that's what management wants but let me play with it and see what I can do. Being a developer (SQL, .Net, Perl, etc) I could handle this with a simple query. I feel like I'm such a newb when trying to work with QB lol.Re: How to create a total of weekly allocated hours per employeeIn this scenario where/how would a notification get triggered? I do already have a Summary Report that displays the total hours allocated for all weeks in the future grouped by employee and weekly end date- I also used some JavaScript to highlight/color the cells (employ row, weekly end date column) that are over (and under) allocated. But management wants to notified in email instead of just looking at the summary report. I'd also like to be able to display the total hours allocated to an employee for any given week when the project managers are allocating hours (so instead of just management getting an email notification, the PM's can see in real-time how many hours an employee is already allocated (for any/all tasks they are assigned).How to create a total of weekly allocated hours per employeeI'm looking for a way to create a total of all allocated hours per employee, per week. I currently have a Summary Report that does display the information needed, but management wants to be able to trigger notification if/when a resource is over-allocated hours for any given week. The basic structure for this app is: Projects have multiple Tasks and Tasks have multiple Resources (employees). When resources are allocated hours new entries are created (or updated if an existing entry is edited) into a Assigned Resources table. The relevant fields are: Resource (employee) Week End Date Task What I'm trying to do is add all the hours for an employee for each week (Week End Date) for any/all tasks. Like I mentioned above my management wants to be notified if an employee is allocated more than 40 hours in any given week for all Tasks they are assigned to- they don't want to just rely on looking at the Summary Report alone. I tried to create a Summary "Field" in the relationship but I am not really sure that is possible- or how exactly to do it in this case (add all hours assigned to an employee over multiple tasks). I also considered creating a separate table and use Quick Base Automations to store the total, but I'm not sure that's really going to work in this case. I did see a post where someone suggested concatenating fields together as a key (in this case, Resource and Week End Date?) but I'm not sure how to do that either (I did try created a formula field to put those together, but I wasn't sure where to go from there and I couldn't use it as a key). Does anyone have an suggestions or can point me in the right direction?