Once their hours have been filled in and submitted this gets grouped together with other entries for that job and the sum get displayed in the jobs records form.
I can then view all the jobs I have to see compare what jobs are over / under time.
When I conventionally add a single entry form submission this all works absolutely fine. However when I import a CSV into timesheets the On Success code doesnt trigger so my job sheets dont show any hours have been added etc.
Can someone help please? I have been struggling for the last couple of days trying to work out a solution!
// Updating Jobs Form
Total_Travel_Lookup = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Travel_Total_Time);
Total_Survey_Lookup = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Survey_Total_Time);
Total_Office_Lookup = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Office_Total_Time);
Total_Time_Lookup = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Total_Time_Decimal);
//
Total_Employee_Costs = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Total_Hourly_Cost);
Total_Expense_Costs = Form_Timesheet_Expenses[Job_Name_Lookup == input.Job_Name_Lookup].sum(Total_Expense);
//
if(What_Do_You_Want_To_Do == "Adding Working Time")
{
JobName = add_job_form[ID == input.Job_Name_Lookup];
//
JobName.Travel_Hours=Total_Travel_Lookup;
JobName.Survey_Hours=Total_Survey_Lookup;
JobName.Office_Hours=Total_Office_Lookup;
JobName.Total_Hours=Total_Time_Lookup;
//
JobName.Costs_Employees=Total_Employee_Costs;
JobName.Costs_Expenses=Total_Expense_Costs;
JobName.Costs_Total=JobName.Costs_Employees + JobName.Costs_Expenses;
//
JobName.Travel_Hours_Plus_Minus=JobName.Quote_Travel_Hours - input.Travel_Total_Time;
JobName.Survey_Hours_Plus_Minus=JobName.Quote_Survey_Hours - input.Survey_Total_Time;
JobName.Office_Hours_Plus_Minus=JobName.Quote_Office_Hours - input.Office_Total_Time;
JobName.Total_Hours_Plus_Minus=JobName.Travel_Hours_Plus_Minus + JobName.Survey_Hours_Plus_Minus + JobName.Office_Hours_Plus_Minus;
//
JobName.Profit_Plus_Minus=JobName.Finance_Quoted_Value_With_VAT / 1.2 - (Total_Employee_Costs + Total_Expense_Costs);
//
}