RyanAshton

Copy two fields from 1 record to another table

Discussion created by RyanAshton on May 6, 2016
Latest reply on May 14, 2016 by RyanAshton

Hi guys,

 

I have this list of Products in my Product_Table. 

 

In the top left corner you can see the Project that is selected - "27" in this case.

 

When I press the "+" button next to each item, I want it to add a new record to the Line_Item_Table related to the Project "27" and copy the fields: Cost_Price, Description & %_Markup from the selected record in Product_Table to the newly created record in Line_Item_Table and reference all the other related fields from Product_List and also make "Quantity" = 1.  If the "+" button gets pressed again, then "1" is added to the quantity, but the record isn't added again.  And of course if "-" is pressed then 1 is subtracted from the Quantity on that item from Line_Item_Table and if Quantity =1 then the record is deleted.

 

Does that make sense?

 

Screenshot 2016-05-07 14.48.22.png

Outcomes