0
Hi, I have a Materials Table that has a sub-table with different costs by Suppliers. Now I'm creating a Purchase Order and selecting the Material in the line item and I would like to populate the proper cost by matching the record with the Purchase order Supplier. can anyone help me with the proper select syntax ?
Thank you
2 replies
-
Hi Rocco
Your data model should look something like this
In the Lines table the Trigger after update can have something like
The fields ending ID are my reference fields.
Regards John
-
Thanks John. this is my data model looks like this :
and thanks to your help this works:
if not Materials.Id then
'PO Cost Each' := null
else
let x := this;
'PO Cost Each' := first(select 'Supplier Costs' where Materials.Id = x.Materials.Id and Supplier.Id = x.'Purchase Orders'.Suppliers.Id).Cost
endNow I need help with the for loop syntax to change all the PO line items (Po Cost Each) to change when I update the PO supplier
thank you
Content aside
- 3 yrs agoLast active
- 2Replies
- 306Views