ExecuteSQL("SELECT SUM(Qty) FROM portaltablename WHERE itemlocation = ? AND itemtype = ? AND foreignKey = ?";"";"";"local";"labor";parenttable::primarykey)
Otherwise, what you would need to do is create that if() statement as a calculated field (auto-enter number field is fine) in the portal table, then summarize THAT field through the relationship in your parent table.
You could also consider 2 portals, one with local and one with labor. Would make sense.
1 of 1 people found this helpful
Filtered one row portals with filters that filter for the records to total with a summary field defined in the portal's table could produce these sub totals.
philmodjunk: Thank you!!! your method worked.
Yep! see if this article helps:
IF you need these values elsewhere you can NAME the objects and use: