burkybang
12/20/2021, 9:32 PMEntity.type != 'Employee'
, but it seems to ignore my filter. When I put Entity.type as a column, it returns "Employee", but when I apply the LOWER function to Entity.type, it returns "relationship field". This makes me think that when I try to do my filter Entity.type != 'Employee'
, it's not working because Entity.type
is actually returning "Relationship Field". How can I filter using Entity.type
properly?Clay Roper
12/20/2021, 10:14 PMSELECT
COUNT(id)
FROM entity
WHERE REGEXP_INSTR(LOWER(BUILTIN.DF(type)), 'employee') = 0
or
SELECT
COUNT(id)
FROM entity
WHERE id NOT IN (
SELECT id
FROM employee
)
Clay Roper
12/20/2021, 10:16 PMemployee
appear to be filtered views (or something like that) on the entity table, where the IDs in the employee table refer to the same entries in the entity tableburkybang
12/20/2021, 10:33 PMClay Roper
12/20/2021, 10:56 PMburkybang
12/20/2021, 11:09 PMmichoel
12/20/2021, 11:34 PMSELECT BUILTIN.DF(entity.type),
FROM message
JOIN entity ON message.author = entity.id
WHERE BUILTIN.DF(entity.type) != 'Employee'
burkybang
12/20/2021, 11:35 PMmichoel
12/20/2021, 11:36 PMmichoel
12/20/2021, 11:37 PMmichoel
12/20/2021, 11:38 PMmichoel
12/20/2021, 11:38 PMmichoel
12/20/2021, 11:39 PMBUILTIN.MNFILTER(entity."TYPE", 'MN_EXCLUDE', '', 'FALSE', 'Employee')
which throws an error when I tried to use in SuiteQL