Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Drop Field if Match?

Hi,

I have two tables and the Key is C-ID. I haven't loaded in O-ID in table 1 yet but I want to make the connection between Table 1 and Table 2 with rows that have O-ID and drop the C-ID for those rows:

Table 1:

C-IDL-IDO-ID
1X
2Y222
3Z

Table 2:

C-IDO-ID2
1111
2222

How do I properly do that in the load script?

if([O-ID] = [O-ID2], DROP FIELD [C-ID])

Thanks!

Jason

2 Replies
MarcoWedel

‌can you provide an extended example and the expected result?

regards

Marco

maxgro
MVP
MVP

expected result (from what I understand)

1.png

Table2:

load * inline [

C-ID, O-ID2

1, 111

2, 222

];

Table1:

load

  if(Exists([O-ID2], [O-ID]), null(), [C-ID]) as [C-ID],

  [L-ID],

  [O-ID]

inline [

C-ID, L-ID, O-ID

1, X,

2, Y, 222

3, Z, 

];