Lookup field from a calculation
Posted: 2024-08-24 05:49
I have a system with item donations for an auction that includes the item's value. I then make catalog items that could consist of many item donations.
So the catalog item has a calculated field to grab the values for all the child donations items; this code works and pulls in the total value of the catalog item:
I then have an invoice table to record someone bought the catalog item. The catalog item is joined to the invoice and I have a lookup of the catalog value to the calculated field in the catalog table. Currently it only shows the Catalog ID not the calculated value for the field.
I searched and found this article - https://bigprof.com/appgini/help/advanc ... culations/ but it doesn't really explain how exactly I would use this.

I appreciate any assistance.
So the catalog item has a calculated field to grab the values for all the child donations items; this code works and pulls in the total value of the catalog item:
Code: Select all
SELECT CONCAT('$', FORMAT(COALESCE(SUM(`Donations`.`Value`), 0.0), 2)) AS `DonationTotal`
FROM `Catalog`
LEFT JOIN `Donations` ON `Donations`.`CatalogID`=`Catalog`.`ID`
WHERE `Catalog`.`ID`=%ID%
I searched and found this article - https://bigprof.com/appgini/help/advanc ... culations/ but it doesn't really explain how exactly I would use this.

I appreciate any assistance.