Deselect Items from EnumList (Ref type) column if they're selected in another EnumList (Ref type) column

Evening All,

I’m having a little difficulty with an expression.

I’m trying to tell my [asset_name] column to remove items from [asset_name] when those items are selected in the [branch_A_assets] column.

Both are EnumList (Ref type) columns with lists generated in ValidIf and are in the survey table.

Here’s the ValidIf (that works):

ORDERBY(
SELECT(
asset[id],
IN(
[id],
SORT(
UNIQUE(
SELECT(
rf_design[Source Asset ID],
AND(
[_THISROW].[select_asset_type]=[source_asset_type],
[main_asset_name] = [_THISROW].[select_cabinet_to_survey],
[lcs] = [_THISROW].[LCS]
))
+
SELECT(
rf_design[Destination Asset ID],
AND(
[_THISROW-2].[select_asset_type]=[destination_asset_type],
[main_asset_name] = [_THISROW-2].[select_cabinet_to_survey],
[lcs] = [_THISROW-2].[LCS],
NOT(
[destination_asset_type]=‘Cabinet’
)))
),FALSE
)),TRUE
),[asset_name]
)

And then I break it when I add this:

SELECT(
survey[id],[branch_A_assets] = [asset_name],
NOT(
IN(
[id],

)))

I’ve taken a look at these docs but the left and right halves of my brain aren’t playing on the same team tonight… :thinking:



Thanks… :slight_smile:

1 Like

See Constructing a List with Subtraction here:

2 Likes

Thanks @Steve… Just tested… Perfect… :slight_smile:

2 Likes