Anyone know why I can't see the AggregateItemLocat...
# suitescript
c
Anyone know why I can't see the AggregateItemLocation table here?
e
FWIW I can't see that table in my Records Catalog
c
It does exist though, I can query it.
m
I've noticed that too with some tables. They show in the main search, but if you navigate to a related table, then click the target table in the join list, you can see the table details.
j
there are tables you can get to that aren’t in the menu. I often will just directly edit the URL to get where I want to.
c
Is there a syntax guide for suiteql. Things I would expect to work do not work
e.g. WHERE Item IN (16862, 16863, 16864, 16865) AND Location = 'name of location'
Copy code
Search error occurred: Invalid or unsupported search
works fine if I remove the AND
c
@Craig When you remove just the AND and leave the rest of the clause there?
c
Works fine in that scenario
WHERE Item IN (16862, 16863, 16864, 16865)
SELECT BUILTIN.DF(AIL.Item) AS Item, BUILTIN.DF(AIL.Location) AS Location, AIL.QuantityOnHand, TO_CHAR(AIL.LastQuantityAvailableChange, 'YYYY-MM-DD HH12MISS PM') AS LastQtyAvailChangeTS, AIL.OnHandValueMLI AS Value, AIL.AverageCostMLI AS AverageCost, AIL.LastPurchasePriceMli AS LastPurchasePrice, AIL.PreferredStockLevel AS PreferredStockLevel, AIL.LeadTime AS PurchaseLeadTime, AIL.SafetyStockLevel, AIL.LeadTimeOffset, AIL.QuantityOnOrder, AIL.QuantityCommitted, AIL.QuantityAvailable, AIL.QuantityBackOrdered, AIL.QuantityInTransit, AIL.QtyInTransitExternal AS QuantityInTransitExternal, AIL.LastInvtCountDate AS LastCountDate, AIL.NextInvtCountDate AS NextCountDate, AIL.InvtCountInterval AS CountInterval, AIL.InvtClassification AS Classification, ITM.itemid FROM AggregateItemLocation AIL JOIN item ITM ON AIL.Item = ITM.id WHERE ITM.itemid IN ('SECRET NAME!') ORDER BY AIL.Item, AIL.Location
c
@Craig That makes more sense 😄 you can't use aliases in your WHERE clause, so you'd need to use
BUILTIN.DF(AIL.Location)
instead of
Location
there
c
AND BUILTIN.DF(AIL.Location) = 'NAME'
works - thanks!
🙌 1