Lorenzo
12/17/2024, 12:46 PMCeligo AI
12/17/2024, 12:46 PMAI generated answer (using internal Slack threads):To filter transactions by location using SuiteQL, you need to join the transaction lines that contain the location information. The location field is indeed available at the line level, even though it might appear as a header level in your account. Here is a sample SuiteQL query that you can use as a starting point:
sql
SELECT
transaction.id,
transactionLine.location
FROM
transaction
JOIN
transactionLine ON transaction.id = transactionLine.transaction
WHERE
transactionLine.location = 'targetLocationName'
In this query, replace 'targetLocationName' with the actual name of the location you want to filter by.
For your second question about getting a list of items with no transactions yet in a specific location, you can use a SQL query like this:
sql
SELECT
itemId
FROM
item
WHERE NOT EXISTS
(SELECT NULL FROM transactionLine WHERE transactionLine.item = item.id AND transactionLine.location = 'targetLocationName')
Again, replace 'targetLocationName' with the actual name of the location. This query will return the IDs of items that have no transactions in the specified location.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
12/17/2024, 12:46 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863576055
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84432745
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833828568
Celigo AI
12/17/2024, 12:46 PM