Select values Not In another table

I am unsure what I am doing wrong. I am trying to filter my selection when adding a record using the following code in the suggested values but it is not filtering properly.

I am using a form  to add a record to my Viewed table.

First I select [Worker] (a Ref field) in the Viewed table.

The intent is to next select a [DocId] (also a Ref field in the Viewed table) but I want to restrict the selection to Documents that have not already been added for that user. The below code brings up a list of All agreements, even those already added.

ORDERBY(SELECT(Documents[DocId]
,Not(In([_THISROW].[DocId]
,SELECT(viewed[DocId],[_ThisRow].[Worker]=[Worker]
)))),[DocTitle])

Solved Solved
0 2 168
1 ACCEPTED SOLUTION

Maybe this?

ORDERBY(

(Documents[DocId] -

SELECT(Viewed[DocID], [Worker]=[_THISROW].[Worker])

), [DocTitle] )

 

View solution in original post

2 REPLIES 2

Maybe this?

ORDERBY(

(Documents[DocId] -

SELECT(Viewed[DocID], [Worker]=[_THISROW].[Worker])

), [DocTitle] )

 

you're a genius, Suvrutt!!! I never even thought of using minus but that makes it so simple

Top Labels in this Space