I am attempting to acquire the aggregate sales for a specific SKU for a given time period in another db.
In the Purchasing db, each record represents a single SKU. The History db has multiple records with each record having a specific SKU and quantity for that sale.
In the Purchasing db, in a Text Display object, I am using the following formula.
The last option of the Aggregate function is ‘Selected records’ or ‘All records’. Given that I only want those records that pertain to the specific SKU that I am viewing in the Purchasing db, it appears that I have to select the corresponding SKU group of records in the History file each time that I change the current record in Purchasing. This does not sound very efficient.
What it appears that I need is for that last option to instead allow me to specify which records should be used. Alas, it does not do this.
It would appear that you need to expand your formula to include a reference to the targeted SKU in addition to the date range. And you probably do want all records evaluated unless you’ve pre-selected a set hat contains them.
Ya I went down that route to to attempt to include in the formula a reference to the desired sku but I failed to come up with an effective way to pass the desired SKU into the formula as the QueryFormula is evaluated in the History db. What am I missing?
I am wondering: You need a pair of chevrons for a field name containing a space. You need double chevrons for the field in the current database. Would you need triple chevrons if the field name (in the current database) contains a space?
Maybe you should avoid the space in the field name and use e.g. “FHS_SKU”?
While I agree that having spaces is a field name is never a good idea, changing this did not alter the failure. I do appreciate your outside the box thinking though as I had not tried that.
The error tells me that this is more of a compile error than an evaluation error.