Hi David,
In your case, what you could do is loop through the grid and do 3 Basic Math Calculations. The first would be to get the QTY times the Rate. The M
arkup is added after the Rate x QTY, so we'll need this number calculated for each line item. Save it as an action result (ex. QTYxR).
Then, take the action result from the first calculation (QTYxR) and subtract it from the Amount field. This will give you the markup for the line item. Save it as an action result (ex. LineMarkup) Then simply do one more Basic Math Calculation to add the action result from the second calculation to the an action result to hold the total markup (ex. TotalMarkup + LineMarkup).
In total, this woud be about 6 to 7 actions. One to create the TotalMarkup (Assign value to action result), start loop through grid, your 3 calculations, your end loop, then enter value into field.
If you have any questions along the way, please let me know.
Hope this helps.
Adam