I have a parent SQL data table, JobTask with a field for sub assignment to a given task.
Child SQL data table is JobTaskDetail.
jtaskdetail is a collection of JobTaskDetail that is filtered for display of left gallery shown below.
When the sub on JobTask table changes, a new calculated rate should be applied to all the child fields based on their individual sub pricing rules.
Below is the interface used. Sub shown on right side, Work Items with rates on left.
So, for example, a given task changes its assignment from SubA to SubB
New calculated sub specific rates should be applied to each of the child work items for the task.
I am having a really hard time getting this to work. It seems like it should be so easy, but I have spent hours and hours working on it,, searching web, etc.
The code below is basically what I would like to work. The Unit Costs should all be recalculated based on lookup to Sub Rates table.
I have tried many variations of this to get to work.
Help!
Patch('[dbo].[JobTaskDetail]',
ForAll(jtaskdetail,
{JTDDefault_Unit_Cost:
LookUp(SubRates,BuilderID=CurBuilder And TDTask_No=TaskG.Selected.JTTask_No And Class=Class And SubCode=TaskG_EmpSelCB.Selected.WCode,Unit_Cost)}))
Thanks!
Larry