Jump to content

888Washington

Members
  • Content Count

    5
  • Joined

  • Last visited

About 888Washington

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm looking to only insert unique values within a record on update with a trigger. Right now I have two tables set up with a trigger on insert/update. When a user updates a field within the Employee's table, it copies all of the information from the current record into the Employee History table. However, my users want to be able to see what fields were modified within the Employee History table. The trigger currently just copies all fields (and values in those fields - most are text) from the current Employee's table to the Employee History table. The user then can compare the current record in the employee's table with the employee history records and manually scroll through to find what values in each field are different, but this takes quite a bit of time. I would like the trigger to look at all the current values in the fields it is going to copy, if the values have not been changed (or are equal to the current values in the Employee History table), then do not update/insert those fields in the employee history table; otherwise update only the fields that have been changed. This would ideally show only updated field values for each history record, instead of duplicating all of the field values. Thank you for any assistance!
  2. Thank you! I ended up establishing a Join on the inserted value, and was able to accomplish this. I also created an update trigger so that if a user modified the result of the initial trigger, it would update the corresponding table with the most recent information.
  3. Hi, I'm trying to hide two columns in a tabular report if one of the fields has null values or is empty. I've tried the following Java Script several different ways, but can't seem to get it to work correctly. A submission form feeds this tabular report, and if the user doesn't enter values in the 'Qty' field, it should be hidden on the tabular report. <script> var stl='none'; var tbl = document.getElementsByTagName('table')[0]; var rows = tbl.getElementsByTagName('tr'); var EmpQty = ("[@field:Employee_Productivity_Qty]").length; if (EmpQty<0) { for (var row=1; row<rows.length;row++) { var cels = rows[row].getElementsByTagName('td'); cels[7].style.display=stl; cels[8].style.display=stl; } var heads= tbl.getElementsByTagName('th'); heads[7].style.display=stl; heads[8].style.display=stl; } </script> Thank you!
  4. Hi, I'm trying to implement the code above to hide columns 7 and 8 in a tabular report if their values are null. I can't quite seem to tweak the code to make it work for me. See code below. I declared a variable called empqty, which should be the name of the field to check if there are values, if the data is empty (null) then the tabular report should hide columns 7 and 8. Any assistance would be greatly appreciated! Thank you! <script language="javascript" type="text/javascript"> var stl='none'; var tbl = document.getElementsByTagName('table')[0]; var rows = tbl.getElementsByTagName('tr'); var empqty = document.getElementById('Employee_Productivity_Qty'); If (empqty == null) { for (var row=1; row<rows.length;row++) { var cels = rows[row].getElementsByTagName('td'); cels[7].style.display=stl; cels[8].style.display=stl; } var heads= tbl.getElementsByTagName('th'); heads[7].style.display=stl; heads[8].style.display=stl; } </script>
  5. Hi, I'm trying to populate multiple records, based on a single record selection and submittal. I have 3 data pages involved in this process. I'll change some of the naming-convention from my industry-specific jargon to make a bit more sense: Data Page 1: Team Name, Employee, Title In the first data page the user organizes their employee's into different Teams. Each team is given a name and there are usually 4 to 5 employee's on each team who each have their own title. For example, Team 1 may have: > Billy - Team Lead > Bobby - Organizer > Jane - Recruiter > Jim - Record Keeper Data Page 2: Project Name, Team Name, Hours Worked On the second Data Page, the user is asked to enter their project name, and the select a team name from the dropdown menu. The team name dropdown menu is a cascading dropdown field that pulls the list of team names established from the first data page. In this Project, the only available team to select is Team 1 with Billy, Bobby, Jane, and Jim. After the user makes this selection, they enter the # of hours worked for the team. For this Project, we will say each team member worked 2 hours. So the user would enter "2" into the hours worked field and hit submit. Data Page 3: Employee, Assignment, Hours Worked After clicking submit on DataPage 2, I'd like the 3rd DataPage to populate the team member names from the team name selected and insert 2 hours for each employee. The user can then preview and confirm this information before exiting the DataPage. If one of the employee's only had 1 hour on the project, they would then be able to edit one of the team members hours to reflect this. So far, I have created a trigger, where the user can enter the project name, and number of hours, which will then populate the 3rd data page, but I haven't quite figured out how to lookup and insert records for each employee under the team name selected. Any help would be greatly appreciated! This is my first forum posting, so please advise if I should attach more detail or modify my question in any way. Thanks in advance.
×
×
  • Create New...