I have the Client Rate Table that contains the Company Name that is a lookup to the Company Table.
The Client Rate Table has multiple records for one company. the records are differentiated by the Rate Category Field in the Client Rate Table. Based on a radio button selection in The Time Entry table <Rate_Type>, either "Normal" or "Storm" I want to load the rates from the Client Rate Table that are based on that Category from the Client Rate Table.
r = Client_Rate_Table[Company_Name == input.Company_Name && Rate_Category == "Normal"];
r2 = Client_Rate_Table[Company_Name == input.Company_Name && Rate_Category == "Storm"];
if(((input.Company_Name == r.Company_Name) && (input.Rate_Type == "Normal")) && (input.Crew_Member_1_Position == "General Foreman"))
{
//if (input.Crew_Member_1_Position == "General Foreman")
Crew_Member_1_Reg_Rate=r.General_Foreman_Reg_Rate;
Crew_Member_1_OT_Rate=r.General_Foreman_OT_Rate;
}
if(((input.Company_Name == r2.Company_Name) && (input.Rate_Type == "Storm")) && (input.Crew_Member_1_Position == "General Foreman"))
{
Crew_Member_1_Reg_Rate=r2.General_Foreman_Reg_Rate;
Crew_Member_1_OT_Rate=r2.General_Foreman_OT_Rate;