I have a MACHINERY table and a STATUS field (Active, Inactive); I need to record the daily activities in another table. In order not to duplicate a record I use the following expression in Valid_if:
COUNT (
SELECT (Daily machinery report [RDM ID],
AND ([CODE] = [_ THISROW]. [CODE],
[DATE] = [_ THISROW]. [DATE])
)
) = 0,
but I also need it to show me the CODE of the ACTIVE machines.
If I add to the previous expression AND (SELECT (Machinery [CODE, [STATUS] = “ACTIVE”), COUNT (
SELECT (Daily machinery report [RDM ID],
AND ([CODE] = [_ THISROW]. [CODE],
[DATE] = [_ THISROW]. [DATE])
)
) = 0), it gives me an error, what am I doing wrong?
Solved! Go to Solution.
AND(
SELECT(
Machinery[CODE],
[STATUS] = “ACTIVE”
),
COUNT(
SELECT(Daily machinery report[RDM ID],
AND(
[CODE]=[_THISROW].[CODE],
[DATE]=[_ THISROW].[DATE]
)
)
)=0
)
AND(
SELECT(
Machinery[CODE],
[STATUS] = “ACTIVE”
), /*This is returning a list instead of Y/N*/
COUNT(
SELECT(Daily machinery report[RDM ID],
AND(
[CODE]=[_THISROW].[CODE],
[DATE]=[_ THISROW].[DATE]
)
)
)=0 /*This "=0" should be on the previous parentheses*/
) /*This is an extra parentheses*/
This is the error that continues to indicate “has an invalid structure: subexpressions must be Yes/No conditions”
Can you post here what’s inside your expression assistant?
AND(
SELECT(
Machinery[CODE],
[STATUS] = “ACTIVE”
),
COUNT(
SELECT(Daily machinery report[RDM ID],
AND(
[CODE]=[_THISROW].[CODE],
[DATE]=[_ THISROW].[DATE]
)
)
)=0
)
I already told you what was wrong with your expression
User | Count |
---|---|
19 | |
9 | |
8 | |
6 | |
5 |